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

Add vars to host_vars to prevent some suprises

This commit is contained in:
Michael DeHaan 2012-08-14 20:35:01 -04:00
parent 9851066f4d
commit de221e6b4b
2 changed files with 3 additions and 0 deletions

View file

@ -224,6 +224,8 @@ class Play(object):
self.vars_files = [ self.vars_files ] self.vars_files = [ self.vars_files ]
if (host is not None): if (host is not None):
self.playbook.SETUP_CACHE[host].update(self.vars)
inventory = self.playbook.inventory inventory = self.playbook.inventory
hostrec = inventory.get_host(host) hostrec = inventory.get_host(host)
groupz = sorted(inventory.groups_for_host(host), key=lambda g: g.depth) groupz = sorted(inventory.groups_for_host(host), key=lambda g: g.depth)

View file

@ -703,6 +703,7 @@ class Runner(object):
module_data = "" module_data = ""
is_new_style=False is_new_style=False
with open(in_path) as f: with open(in_path) as f:
module_data = f.read() module_data = f.read()
if module_common.REPLACER in module_data: if module_common.REPLACER in module_data: