On 09. juli 2016 17:40, Zeal Vora wrote:
We are planning to run our infrastructure on Ansible Pull Mode so all the
host machines will keep on polling every few minutes.

In a single outside.yml file, we will have around 8 playbooks.

I want to mark a specific whole playbook as completed if there is certain
file present in a remote system.

What is the most ideal way to achieve this ?

It's not possible to mark the execution as complete, but you could skip a role.

Put the playbook in its own file, lets say play1.yml

In outside.yml use stat module to check if the file exist and register the result in a variable e.g. result and then you can include the role like this

- include: play.yml
  when: result.stat.exists == false

--
Kai Stian Olstad

--
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/5783A5EC.5050203%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to