Get (potentially) new composite host vars from inventory (#32606)

* Get new composite host vars from inventory

* Remove spaces from blank line
pull/32661/head
Denver Janke 7 years ago committed by ansibot
parent 1fd454e5b5
commit 57106662db

@ -116,6 +116,11 @@ class InventoryModule(BaseInventoryPlugin):
# create composite vars
self._set_composite_vars(data.get('compose'), hostvars, host, strict=strict)
# refetch host vars in case new ones have been created above
hostvars = inventory.hosts[host].get_vars()
if host in self._cache: # adds facts if cache is active
hostvars = combine_vars(hostvars, self._cache[host])
# constructed groups based on conditionals
self._add_host_to_composed_groups(data.get('groups'), hostvars, host, strict=strict)

Loading…
Cancel
Save