Load group_vars for new groups loaded via add_host

Fixes #8605
release1.7.1
James Cammarata 10 years ago
parent 789196b2b8
commit ef1ae4db86

@ -83,6 +83,7 @@ class ActionModule(object):
if not inventory.get_group(group_name): if not inventory.get_group(group_name):
new_group = Group(group_name) new_group = Group(group_name)
inventory.add_group(new_group) 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 = inventory.get_group(group_name)
grp.add_host(new_host) grp.add_host(new_host)

Loading…
Cancel
Save