# ios\_config module - identifying differences between running & intended config

**URL:** <https://forum.ansible.com/t/ios-config-module-identifying-differences-between-running-intended-config/27781>\
**Category:** Ansible Project\
**Created:** [June 12, 2018, 3:35pm UTC](https://forum.ansible.com/t/ios-config-module-identifying-differences-between-running-intended-config/27781 "2018-06-12T15:35:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rckd02](https://avatars.discourse-cdn.com/v4/letter/r/91b2a8/32.png) [@rckd02](https://forum.ansible.com/u/rckd02)\
**Post date:** [June 12, 2018, 3:35pm UTC](https://forum.ansible.com/t/ios-config-module-identifying-differences-between-running-intended-config/27781/1 "2018-06-12T15:35:04Z")

</div>

I have the following playbook and would like to know if it is expected behavior that ‘changed\_when:false’ would cause the the differences between the two files not to be shown in the output.  
My goal with this playbook is to use it to audit some configurations to demonstrate Ansible’s capabilities to a colleague before we use it to actually update configurations.  
Running this with $ansible-playbook check.yml --check --diff -vvvv

> * * *
> 
> #This playbook will compare the running configuration against a reference file and note the differences
> 
> - hosts: myhost  
> gather\_facts: false  
> remote\_user: user  
> tasks:
> - name: compare running configuration against master (a reference file)  
> ios\_config:  
> diff\_against: intended  
> intended\_config: “{{ lookup(‘file’, ‘master.cfg’) }}”  
> match: line  
> diff\_ignore\_lines:
> - ntp clock .\*
> - secret 5 \*
> - hostname \*
> - date \*  
> diff: true  
> register: diff\_results  
> changed\_when: false

> — before  
> +++ after  
> @@ -1,4 +1,3 @@  
> -Tue Jun 12 09:17:06.698 MDT  
> clock timezone MST MST7MDT  
> service timestamps log datetime localtime msec show-timezone  
> service timestamps debug datetime localtime msec show-timezone  
> @@ -11,6 +10,7 @@  
> address-family ipv4 unicast  
> ntp  
> server vrf Management 1.2.3.4
> 
> - server vrf Management 5.6.7.8

Its probably worth mentioning that the only difference between the running config and the intended configuration is the addition of a line: “ **_server vrf Management 5.6.7.8_** ”.

thank you.
