Get (potentially) new composite host vars from inventory (#32606)
* Get new composite host vars from inventory * Remove spaces from blank line
This commit is contained in:
parent
1fd454e5b5
commit
57106662db
1 changed files with 5 additions and 0 deletions
|
@ -116,6 +116,11 @@ class InventoryModule(BaseInventoryPlugin):
|
||||||
# create composite vars
|
# create composite vars
|
||||||
self._set_composite_vars(data.get('compose'), hostvars, host, strict=strict)
|
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
|
# constructed groups based on conditionals
|
||||||
self._add_host_to_composed_groups(data.get('groups'), hostvars, host, strict=strict)
|
self._add_host_to_composed_groups(data.get('groups'), hostvars, host, strict=strict)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue