Ansible – Ansible playbook dry run

The dry run is the best way to analyze the possible outcome of the configuration management code. Ansible playbook dry run command allows us to check the potential effects on our infrastructure/applications upon execution of the Ansible playbook.

Syntax

ansible-playbook pkg_install.yml --check
Ansible playbook dry run –check command

The ansible-playbook –check command will only provide us the information on changes the code will perform without actually executing the changes.