mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
for #2196 now gruopby module invalidates host cached variables so they can be reevaluated with new groups
Signed-off-by: Brian Coca <bcoca@tablethotels.com>
This commit is contained in:
@@ -68,6 +68,7 @@ class ActionModule(object):
|
|||||||
inv_group = ansible.inventory.Group(name=group)
|
inv_group = ansible.inventory.Group(name=group)
|
||||||
inventory.add_group(inv_group)
|
inventory.add_group(inv_group)
|
||||||
for host in hosts:
|
for host in hosts:
|
||||||
|
del self.runner.inventory._vars_per_host[host]
|
||||||
inv_host = inventory.get_host(host)
|
inv_host = inventory.get_host(host)
|
||||||
if not inv_host:
|
if not inv_host:
|
||||||
inv_host = ansible.inventory.Host(name=host)
|
inv_host = ansible.inventory.Host(name=host)
|
||||||
|
|||||||
Reference in New Issue
Block a user