Hi,

I have been trying to find a solution to the current scenario.

Say we have 3 plays

1)Pre-Condition Check   - check that the host is in the correct state 
before proceeding.
2)Make Change
3)Post-Condition Check


Now we don't want the 2nd play to be run on hosts that failed the first 
play.  This is a very common scenario I would think, especially with 
Ansible making a push into the Network Automation space.

One solution is to set serial : 1 however that leads to other following 
issues:

-Triggers a stdout bug in AWX/Tower which renders the live feedback unusable
- Means that if one Host fails the whole playbook fails and doesn't 
continue on to other hosts
- The above would be alright if there was a mechanism to say start from the 
last failed host and finish the rest


So I am looking for another approach. 

What I am wondering is it possible to set a fact ( which I believe is set 
on a per host level ) on the success or failure of a play for that host and 
then use it in a when conditional in the subsequent play?

This way successful hosts will continue and failed hosts will not.  

Many thanks in Advance.

-- 
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/e2abe13e-909a-4d6a-ad5b-588c3a87c24a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to