thank you but my question is about the rescue reserved word ?
Is it possible to run the rescue block with a tag instead of tagging all
tasks in the rescue block ?
Regards
Le jeudi 13 avril 2017 14:03:17 UTC+2, fanvalt a écrit :
>
> 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/8e27afa4-c729-427c-b828-5fff658f0f17%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.