From ee18c557ecc61bb3eab1b20ee3fe2c4db872071d Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Thu, 14 Aug 2014 13:18:26 -0500 Subject: [PATCH] Load group_vars for new groups loaded via add_host Fixes #8605 --- lib/ansible/runner/action_plugins/add_host.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ansible/runner/action_plugins/add_host.py b/lib/ansible/runner/action_plugins/add_host.py index 2ab2164d5c..0e49e928db 100644 --- a/lib/ansible/runner/action_plugins/add_host.py +++ b/lib/ansible/runner/action_plugins/add_host.py @@ -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)