Ansible Playbook “Dry Run” – Check Mode
source link: https://www.shellhacks.com/ansible-playbook-dry-run-check-mode/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Ansible Playbook “Dry Run” – Check Mode
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.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK