Skip to content

lemano ansible revert

Runs lemano revert on one host of an Ansible inventory, reached with the inventory’s own settings, with no target file to keep: the way to undo a change on a host whose target was made by recording a playbook run.

lemano ansible revert [-i INVENTORY]... HOST --to SEQ [PATH]... [lemano revert flags]

The flags and examples of the command are also on its generated page.

It builds the host’s target file as lemano ansible discover does, in a private temporary folder removed afterwards, then runs lemano revert -f FOLDER from the folder of this program, with your standard input and output. --vault-id, --vault-password-file and -J (--ask-vault-pass) are the vault options of lemano ansible discover: they reach every Ansible process below this command, the password step included, and are not passed to lemano revert. Every other flag but -i goes to lemano revert: the preview, the question, the trial, --dry-run, --expect-plan, --auto-approve, -o json and the exit codes are exactly lemano revert’s. HOST is the host’s inventory name. -f and --limit are refused. A trial left unfinished is ended with lemano ansible end-trial.

Example

$ lemano ansible revert -i inventories/prod/hosts.yml web1 --to 12 /etc/nginx/nginx.conf