# How to enhance the --check mode

**URL:** <https://forum.ansible.com/t/how-to-enhance-the-check-mode/26500>\
**Category:** Ansible Project\
**Created:** [January 17, 2018, 2:06pm UTC](https://forum.ansible.com/t/how-to-enhance-the-check-mode/26500 "2018-01-17T14:06:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jorg\_Kastning](https://avatars.discourse-cdn.com/v4/letter/j/96bed5/32.png) [@Jorg\_Kastning](https://forum.ansible.com/u/Jorg_Kastning)\
**Post date:** [January 17, 2018, 2:06pm UTC](https://forum.ansible.com/t/how-to-enhance-the-check-mode/26500/1 "2018-01-17T14:06:48Z")

</div>

Hello all,

we use ansible playbooks to deploy an ininital config for e.g. postfix, chrony and sshd\_config to new hosts. After the deployment these systems are under the control of the associated SysAdmin. We would like to use ansible to audit the nodes to check if the intitial config was changed BUT not to change them automatically.

In my first approach I run my ansible-playbooks with the --check flag. This way i see where ansible would change something on a certain node or deploy a template again. What I do not see is what changes ansible is going to make on the targed node. I would like to see a diff from the file on a node compared to the template on my ansible controller machine. Do someone have an idea on how to achieve this?

Would it be possible and reasonable to enhance the --check mode to achieve this or do I have to write some program at a higher level to get this done?

Thanks in advance for your comments and thoughts.

Best regards,  
Joerg

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [January 17, 2018, 3:20pm UTC](https://forum.ansible.com/t/how-to-enhance-the-check-mode/26500/2 "2018-01-17T15:20:27Z")

</div>

$ ansible-playbook --help | grep diff  
&nbsp;&nbsp;-D, --diff when changing (small) files and templates, show the  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;differences in those files; works great with --check

---

<div class="post-metadata">

**Author:** ![Jorg\_Kastning](https://avatars.discourse-cdn.com/v4/letter/j/96bed5/32.png) [@Jorg\_Kastning](https://forum.ansible.com/u/Jorg_Kastning)\
**Post date:** [January 17, 2018, 5:11pm UTC](https://forum.ansible.com/t/how-to-enhance-the-check-mode/26500/3 "2018-01-17T17:11:53Z")

</div>

Wow. Obviously I need some glasses. Missed that.

Thanks a lot Kai!
