cat vars/BASE.yaml
EXCLUDE_front: value1
EXCLUDE_back: value2
ansible-playbook test.yml -e Layer="back" -e base_folder="/tmp"
- name: Load a variable file"
include_vars:
file: "vars/BASE.yaml"
- name: Collect data
shell: "cd {{ base_folder }} && find . -type d \\( -name 'BACKUP' -o -name 'vars[EXCLUDE_{{ Layer }}]' \\) -prune -o -type f -exec cksum {} + | awk '{$1=\"\"}1'"
register: outputfiles
shell: "cd {{ base_folder }} && find . -type d \\( -name 'BACKUP' -o -name 'vars[EXCLUDE_ + Layer ]' \\) -prune -o -type f -exec cksum {} + | awk '{$1=\"\"}1'"
shell: "cd {{ base_folder }} && find . -type d \\( -name 'BACKUP' -o -name 'vars[EXCLUDE_ ~ Layer ]' \\) -prune -o -type f -exec cksum {} + | awk '{$1=\"\"}1'"
"The task includes an option with an undefined variable. The error was: 'EXCLUDE_' is undefined\n\nT
Can you please suggest what is wrong with my playbook?
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/f76a6376-0ac3-4724-9bb9-6fc54bd69610%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/11ef6e0e-fb43-ddd0-a7e7-64ed0510e782%40linuxia.de.