Skip to content
This repository has been archived by the owner on Jun 14, 2023. It is now read-only.

Revert to Previous Commit or particular commit #442

Closed
mohamedshafiq opened this issue Dec 3, 2019 · 3 comments
Closed

Revert to Previous Commit or particular commit #442

mohamedshafiq opened this issue Dec 3, 2019 · 3 comments

Comments

@mohamedshafiq
Copy link

Hi Team,

I would like to revert to previous or particular commit in Palo Alto when a configuration play get failed. Is there any module available for reverting to previous commit or particular commit. Please help with this.

@megakoresh
Copy link

Hi Team,

I would like to revert to previous or particular commit in Palo Alto when a configuration play get failed. Is there any module available for reverting to previous commit or particular commit. Please help with this.

Set commit: false on every task and commit separately at the end of the playbook. This way it has the same effect. I don't understand why commit is true by default, doesn't make any sense to me, but this is the better way to attain your desired outcome.

@mohamedshafiq
Copy link
Author

if we set commit false it doesn't revert the changes what has been executed during the play before failure. the changes are still available. So now i have implemented block and rescue module in the playbook if any play fails it will revert to the running configuration of the firewall whether this implementation is fine or any other suggestions.

@mrichardson03
Copy link
Contributor

This can be done with the panos_op module and the revert config command.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants