I can run a task conditionally, depending on the existence of a file, as follows:
- name: check if the file exists stat: path=/my/file register: file_register - name: do the actual task include: my_subtask.yml when: not file_register.stat.exists Is it not possible to do smarter things in the when clause? Possible with a Jinja2 directive? I tried to search for the documentation of the lookup() function I see sometimes, but cannot find it. Is is part of Ansible or of Jinja? Is it usable here? Thanks in advance, Eric -- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/0619c55f-1576-4c0a-88bb-302b260d2431%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
