Ansible Dry Run – How to Run Playbook in Ansible Check mode
Excerpt Introduction Ansible Dry Run or Ansible Check mode feature is to check your playbook before execution like Ansible’s –syntax-check feature. With Ansible Dry Run feature you can execute the playbook without having to actually make changes on the server. With Ansible Dry Run you can see if the host is getting changed or not. Introduction Ansible Dry Run or Ansible Check mode feature is to check your playbook before execution like Ansible’s --syntax-check feature. With Ansible Dry Run feature you can execute the playbook without having to actually make changes on the server. With Ansible Dry Run you can see if the host is getting changed or not. Here is a sample playbook is written to install and start the Apache HTTPD web server. --- - name: Playbook hosts: webservers become: yes become_user: root tasks: - name: ensure apache is at the latest version yum: name: httpd state: latest - name: ensure apache is running service: name: httpd state: started Our objective is to install Apache web server and start it but if we want to see if it would affect/change the host or throw error . We can Dry Run this Playbook with no further ado, Let me tell you how to Run the Ansible Playbook in Check mode or dry run mode ASCII Video