Hi team,
I have something like this in my tasks file.
- name: run post sync files
include: “{{inventory_dir}}/…/tasks/post-sync-files.yml”
when: POST_SYNC_FILE == ‘yes’
Even the value of POST_SYNC_FILE is ‘no’ it still include the yml file and run . Inside the yml file there are bunch of tasks whihc also use when as well but not using the above variables.
Not sure what is wrong with this?
Thanks