You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the docs for the meta module, using - meta: refresh_inventory
forces the reload of the inventory, which in the case of dynamic inventory scripts means they will be re-executed. This is mainly useful when additional hosts are created and users wish to use them instead of using the add_host module.
However, in the case of VMware dynamic inventories, this is not happening. In fact, nothing gets logged in the console making it hard to comprehend what's wrong.
STEPS TO REPRODUCE
---
- name: Check if VMs are up and running
hosts: localhost
tasks:
- name: Initial Pause until some VM facts like the IP become available
pause: minutes=2
# This one just contains the names
- include_vars: /var/lib/awx/projects/vms/vmnames.yml
- name: Using vsphere_guest module to verify if VM is available
vsphere_guest:
vcenter_hostname: <<hostname>>
guest: "{{ item }}"
validate_certs: no
vmware_guest_facts: yes
esxi:
datacenter: <<dcname>>
hostname: <<name>>
with_items: "{{ allvms }}"
register: vmfacts
no_log: True
- meta: refresh_inventory
- name: Checking if wait_for works
wait_for: host={{ hw_eth0.ipaddresses[1] }} state=started delay=60 timeout=60 connect_timeout=15
with_items: "{{ vmfacts.results }}"
no_log: True
EXPECTED RESULTS
I expect the dynamic inventory to refresh and show me the available VMs under hosts (this one after syncing manually).
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered:
@gischethans Tower's inventory system is a bit different than the standard in-memory inventory object of OSS ansible. Please reach out to our Tower support team for further assistance/recommendations.
ISSUE TYPE
COMPONENT NAME
meta
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Ubuntu 14.04.5 LTS with Ansible Tower 3.0.0
SUMMARY
According to the docs for the meta module, using
- meta: refresh_inventory
However, in the case of VMware dynamic inventories, this is not happening. In fact, nothing gets logged in the console making it hard to comprehend what's wrong.
STEPS TO REPRODUCE
EXPECTED RESULTS
I expect the dynamic inventory to refresh and show me the available VMs under hosts (this one after syncing manually).
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: