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)