# I have a query regarding how to print difference between an ansible output and customer expected value.

**URL:** <https://forum.ansible.com/t/i-have-a-query-regarding-how-to-print-difference-between-an-ansible-output-and-customer-expected-value/36233>\
**Category:** Ansible Project\
**Created:** [January 21, 2022, 9:01am UTC](https://forum.ansible.com/t/i-have-a-query-regarding-how-to-print-difference-between-an-ansible-output-and-customer-expected-value/36233 "2022-01-21T09:01:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marian\_Saldhana](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@Marian\_Saldhana](https://forum.ansible.com/u/Marian_Saldhana)\
**Post date:** [January 21, 2022, 9:01am UTC](https://forum.ansible.com/t/i-have-a-query-regarding-how-to-print-difference-between-an-ansible-output-and-customer-expected-value/36233/1 "2022-01-21T09:01:36Z")

</div>

As per my role [root@ansible-master tasks]# cat main.yml

— # tasks file for Security\_Info\_Tab8 - shell: grep -v ^# /etc/xinetd.d/telnet | grep -i disable register: telnet\_setting changed\_when: false - assert: that: - lookup(‘file’, ‘customer-expects.txt’) == telnet\_setting.stdout fail\_msg: missed success\_msg: matched

---

<div class="post-metadata">

**Author:** ![Evan\_Hisey](https://avatars.discourse-cdn.com/v4/letter/e/ce73a5/32.png) [@Evan\_Hisey](https://forum.ansible.com/u/Evan_Hisey)\
**Post date:** [January 22, 2022, 5:59pm UTC](https://forum.ansible.com/t/i-have-a-query-regarding-how-to-print-difference-between-an-ansible-output-and-customer-expected-value/36233/2 "2022-01-22T17:59:19Z")

</div>

If I am reading this correctly the text file is just “root”. This will never match the telnet.setting, as is it will be either “disable no” or “disable yes”. Is this the intended comparision?
