Hi guys!,
I would like to know if there are any ‘try - catch / rollback’ mode, I mean, I’m running a playbook with some tasks, when a given task crashes, I would like to run an external error recovery task ¿Can I do that?
Playbook example:
- hosts: someofthem
user: myuser
tasks:
-name: First task
action: whatever
onerror: clean_and_exit #this could be task (or a handler)
-name: Second task
action: whatever
onerror: clean_and_exit
…
-name: clean_and_exit
action: do something…
Thanks in advance