infra-data.yml
Or maybe, if vmware_inventory.py
setup break things
infra-data.yml -i inventory/local
Presently mainly use to define vcenter_hostname
and
vcenter_username
infra-secret.yml
Presently mainly use to define vcenter_password
from a vault file
inventory.yml -i inventory/local
- make link to
vmware_inventory.py
ininventory
dir using dedicated ressource name - copy
vmware_inventory.ini
ininventory
dir using dedicated ressource name - configure named ini file using imported data and secret vars
refresh_inventory.yml -i inventory/local
- Currently use default
cache_max_age
of 3600.
Using passwordstore.org password manager instead of ansible vault.
env VMWARE_PASSWORD=$(pass oxa/vcenter) ansible local -m meta -a noop
jq . < .cache/ansible/ansible-vmware.cache > tmp/ansible-vmware.js
jq='[._meta.hostvars[] | { name: .name, uuid: .config.uuid }]'
jq "$jq" < .cache/ansible/ansible-vmware.cache > tmp/vmname2uuid.js
jq='[._meta.hostvars[] | { (.name): .config.uuid }] | reduce .[] as $i ({}; .+ $i) | { vmname2uuid: . }';
jq='reduce ._meta.hostvars[] as $i ({}; .+ { ($i.name): $i.config.uuid }) | { vmname2uuid: . }';
jq "$jq" < .cache/ansible/ansible-vmware.cache > tmp/vmname2uuid.js