I managed to implement this thanks to this stack overflow post:

http://stackoverflow.com/questions/39300734/how-can-i-configure-an-all-or-nothing-ansible-playbook?answertab=votes#tab-top

I hope it helps.
Kind regards,
AS

El viernes, 2 de septiembre de 2016, 17:38:45 (UTC-3), Amir Samary escribió:
>
> Hi!
>
> I am new to Ansible too... I don't think that is what Xu wanted... I want 
> something similar... I need an "all or nothing" approach like this:
> - Take a lvm snapshot on all servers
> - If I can't take a snapshot of a single server, do not proceed
> - Do whatever I need to do on all servers
> - If a single server fails, rollback the snapshot on all servers
>
> If one server is blocking everyone, I can decide to take it out entirely 
> (from the inventory and from the network) before running the playbook again.
>
> I have been reading the documentation and doing some simple tests but I 
> can't find a way of doing this. Ansible's blocks with the rescue sections 
> looked promising but the rescue will only run for the node that failed and 
> not for all nodes...
>
> Do you think it is possible to do something like this with Ansible?
>
> Respectfully,
> Amir Samary
>
> El martes, 10 de diciembre de 2013, 17:22:57 (UTC-3), Brian Coca escribió:
>>
>> forgot the last:
>>
>> - hsots: webnodes
>>   serial: 1
>>   tasks:
>>     - startup
>>
>

-- 
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/6599da91-6e75-47ab-9880-d21f53e83f89%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to