Hi,
I have a playbook where I want to include another playbook which name is depended on variable passed in --extra_vars:
$ ansible-playbook test.yaml --extra_vars=“variable=XYZ”
Inside test.yaml:
TASK1
TASK2
-include: another_playbook_{{variable}}.yaml
TASK3
TASK4
The problem is that ansible throws exception that “another_playbook_{{variable}}.yaml” doesn’t exist instead of substitute “{{variable}}” with value given in command line (I expect to execute another_playbook_XYZ.yaml).
Do you see any possibility to work around it?
Thanks