--
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 post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/4cb8ba86-a8be-4dc0-a73e-c0a98f4ba9f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAHHcNoepfZ7LsGP0DTRz94iXsW-TzOiJ_pZAGS7eub-GzfRXTQ%40mail.gmail.com.
- vars:
- playbook: "file"
include: "{{ playbook }}.yml"
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/4db0c81d-ea5d-42cc-8e49-8e23be2dae5f%40googlegroups.com.
- include: load_balancers.yml
- include: webservers.yml
- include: dbservers.yml
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/2e159522-7fbe-46b1-894d-90cd839867c0%40googlegroups.com.
Extra vars would be fine here.Variables defined in a play can be used in task includes if passed to the include, but not to determine the filename.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/c156ac3a-8cb3-4b04-8ae5-b3ea9cb4a0e3%40googlegroups.com.
"Having a vars_prompt that works on playbook level would be useful here."While vars_prompt appears nice, and it can be, it also reduces the ease at which a playbook can be run by other-automation or inserted into a script or continuous deployment workflow. As such, it's better to avoid it if possible.
- name: Include module variables
include_vars: '{{ module }}.yml'
- include: prereq-{{ module }}-status.yml
I've defined each yml (prereq-cq-status.yml, prereq-dmgr-status.yml,prereq-ihs-status.yml) in same role/tasks
and files are mentioned in roles/vars (cq.yml,dmgr.yml,ihs.yml)
Note :module defined in inventory
got syntax error, ERROR: file could not read: (role/tasks/prereq-{{module}}-status.yml)
Can some one help me please.how to fix this