1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Load group_vars for new groups loaded via add_host

Fixes #8605
This commit is contained in:
James Cammarata 2014-08-14 13:18:26 -05:00
parent b4476c238f
commit ee18c557ec

View file

@ -83,6 +83,7 @@ class ActionModule(object):
if not inventory.get_group(group_name):
new_group = Group(group_name)
inventory.add_group(new_group)
new_group.vars = inventory.get_group_variables(group_name, vault_password=inventory._vault_password)
grp = inventory.get_group(group_name)
grp.add_host(new_host)