Hi Folks,
I would to ask some suggestions for controlling a state rollback of ansible-plyabook tasks .
Are there some best practice to follow ?
Thank you,
Steano L.
Hi Folks,
I would to ask some suggestions for controlling a state rollback of ansible-plyabook tasks .
Are there some best practice to follow ?
Thank you,
Steano L.
Hi,
Ansible does not have a mechanism to keep track of changes and automatically perform a rollback. However, there are a couple of ways you could use to fulfill your requirement:
Something like below:
`
The only disadvantage of using blocks is that rollback would only be limited to the hosts on which the task has failed in block section. You may refer to the link for more details.
Something similar to the below playbook:
`