mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-29 11:40:22 -07:00
Fix correct variable expansion in includes only_if.
There's not need to run the complete include through the templating engine. Several variables were not included before the conditional was evaluated.
This commit is contained in:
parent
dab50574e0
commit
cd9f926b5f
6 changed files with 61 additions and 6 deletions
|
@ -160,8 +160,7 @@ class PlayBook(object):
|
|||
include_vars[k] = v
|
||||
inject_vars = play_vars.copy()
|
||||
inject_vars.update(include_vars)
|
||||
included = utils.template_from_file(path, inject_vars, SETUP_CACHE, no_engine=True)
|
||||
included = utils.parse_yaml(included)
|
||||
included = utils.parse_yaml_from_file(path)
|
||||
for x in included:
|
||||
if len(include_vars):
|
||||
x["vars"] = include_vars
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue