mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
cd9f926b5f
There's not need to run the complete include through the templating engine. Several variables were not included before the conditional was evaluated.
15 lines
308 B
YAML
15 lines
308 B
YAML
---
|
|
# Test correct variable expansion in included files and only if
|
|
- hosts: all
|
|
vars:
|
|
favcolor: "blue"
|
|
guard: ' "$favcolor" == "blue" '
|
|
vars_files:
|
|
- common_vars.yml
|
|
|
|
tasks:
|
|
|
|
- include: playbook_included.yml
|
|
|
|
# test overrides of variables
|
|
- include: playbook_included.yml favcolor=red
|