Tweaked merge_hash to also affect Runner behavior

This commit is contained in:
George Miroshnykov 2013-03-10 01:30:18 +02:00
parent 94d189bc7f
commit 6826aa7360
9 changed files with 110 additions and 23 deletions

View file

@ -330,8 +330,9 @@ class Play(object):
if host is not None and self._has_vars_in(filename2) and not self._has_vars_in(filename3):
# running a host specific pass and has host specific variables
# load into setup cache
self.playbook.SETUP_CACHE[host].update(new_vars)
self.playbook.SETUP_CACHE[host] = utils.combine_vars(
self.playbook.SETUP_CACHE[host], new_vars)
self.playbook.callbacks.on_import_for_host(host, filename4)
elif host is None:
# running a non-host specific pass and we can update the global vars instead
self.vars.update(new_vars)
self.vars = utils.combine_vars(self.vars, new_vars)