# Incorrect Output from junos ansible command module

**URL:** <https://forum.ansible.com/t/incorrect-output-from-junos-ansible-command-module/34047>\
**Category:** Ansible Project\
**Created:** [October 16, 2020, 11:40pm UTC](https://forum.ansible.com/t/incorrect-output-from-junos-ansible-command-module/34047 "2020-10-16T23:40:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AK1](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@AK1](https://forum.ansible.com/u/AK1)\
**Post date:** [October 16, 2020, 11:40pm UTC](https://forum.ansible.com/t/incorrect-output-from-junos-ansible-command-module/34047/1 "2020-10-16T23:40:37Z")

</div>

Hi Folks, I am trying to display output for junos command “show configuration | compare rollback 1” through ansible however every time I store the data, I see the whole config output. Any ideas?

Is there another way to get the previously commited data using rollbacks? I am using the new role “junipernetworks.junos.junos” so im not find a way to come up with a way for this. Previous role junos\_config had a way but modules have now changed.

**Playbook**

---

<div class="post-metadata">

**Author:** ![AK1](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@AK1](https://forum.ansible.com/u/AK1)\
**Post date:** [October 17, 2020, 12:18am UTC](https://forum.ansible.com/t/incorrect-output-from-junos-ansible-command-module/34047/2 "2020-10-17T00:18:08Z")

</div>

Figured it out. Connection to be used is network\_cli and not netconf for this module.
