mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fixes #4239 merge injects with new vars loaded from files
This commit is contained in:
parent
d327e3d11a
commit
95c79ad483
1 changed files with 2 additions and 0 deletions
|
@ -777,6 +777,7 @@ class Play(object):
|
|||
if self._has_vars_in(filename2) and not self._has_vars_in(filename3):
|
||||
# this filename has variables in it that were fact specific
|
||||
# so it needs to be loaded into the per host SETUP_CACHE
|
||||
data = utils.combine_vars(inject, data)
|
||||
self.playbook.SETUP_CACHE[host].update(data)
|
||||
self.playbook.callbacks.on_import_for_host(host, filename4)
|
||||
elif not self._has_vars_in(filename4):
|
||||
|
@ -809,6 +810,7 @@ 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
|
||||
new_vars = utils.combine_vars(inject, 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)
|
||||
|
|
Loading…
Reference in a new issue