An Ansible’s “dry run” or check mode feature is just a simulation of the execution of the ansible-playbook
command.
When the ansible-playbook
command is executed in the check mode, it will not make any changes on a target system.
With the Ansible’s “dry run” feature you can see if the target system is getting changed or not before actually applying the playbook and making any changes on the target host.
Cool Tip: Ansible Playbook – Print Variable & List All Variables! Read more →
Ansible “Dry Run”
To run the ansible-playbook
command in the “dry run” check mode, simply execute it with the --check
option:
$ ansible-playbook playbook.yml --check
The command above won’t make any changes on the target system but just simulate the execution of the ansible-playbook
command and show if the target host is getting changed or not.