Hey, It is really very interesting this section rescue but if in my block I execute for example a script sql which does a lot of actions and that there is an error ...
So what to put in the rescue section? Thanks for your help ! :) Regards, Le mardi 14 mai 2019 18:01:00 UTC+2, Eric Hymowitz a écrit : > > The problem you have is that ansible does not retain the old state of the > machine when it makes changes. The fact that you executed the command > "touch test_file.txt" does not indicate whether test_file.txt did or did > not exist prior to running the command. So to "roll back", do you erase > the file? Change the date-stamp back to what it was? > > Probably the closest thing you will find is a "block" with a "rescue" > section attached, to specify what you want to happen in the event of an > error. > > https://docs.ansible.com/ansible/latest/user_guide/playbooks_blocks.html > > --EbH > -- 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/719ee931-0a2a-4790-a9c9-9e334e400d32%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
