hello,

I have a playbook running well, but I want to be able to restore files if 
it fails.
So I want to add a block/rescue, I am allowed to tag the rescue so the 
restore of files will only run if I run my playbook with the 
--tags="restore" ?
Or do I Have to tag all the tasks in the rescue block ?


here is an example:

- block:
  - tasks: save the config file
    shell: chdir=/{{ Directoryname }} mv config {{ dirsav }}/

- rescue:
  - tasks: restore the config file
    shell: chdir="{{ dirsav }}" mv config /{{ Directoryname }}/
tags:
    - restore

Regards

-- 
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/cb6595ce-f230-48be-af1a-85909b54c364%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to