# Ansible netconf is not working with Cisco IOS

**URL:** <https://forum.ansible.com/t/ansible-netconf-is-not-working-with-cisco-ios/28878>\
**Category:** Ansible Project\
**Created:** [October 26, 2018, 6:40pm UTC](https://forum.ansible.com/t/ansible-netconf-is-not-working-with-cisco-ios/28878 "2018-10-26T18:40:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Krishna\_Kotha](https://avatars.discourse-cdn.com/v4/letter/k/b782af/32.png) [@Krishna\_Kotha](https://forum.ansible.com/u/Krishna_Kotha)\
**Post date:** [October 26, 2018, 6:40pm UTC](https://forum.ansible.com/t/ansible-netconf-is-not-working-with-cisco-ios/28878/1 "2018-10-26T18:40:01Z")

</div>

Hello,

I am trying to use Netconf\_config model on Cisco switch catalyst 9300.  
I am getting following error message.

You can see the playbook and the running the palybook. I tried with different options like changing the RPC, indentation and changing the XML to content in playbook. But nothing worked.

Please let me know where i need to change.

auto@automation:~/python/ansible$ ansible-playbook testing.yaml -u admin -k  
SSH password:

PLAY [ios-xe] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

TASK [interface configuration] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
fatal: [10.1.1.5]: FAILED! =\> {“changed”: false, “msg”: “{‘info’: ‘\<?xml version=\"1.0\" encoding=\"UTF-8\"?\>\<error-info xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"\>default-operation\n\n’, ‘severity’: ‘error’, ‘tag’: ‘unknown-element’, ‘path’: '\n /rpc/edit-config\n ', ‘message’: None, ‘type’: ‘protocol’}”}  
to retry, use: --limit @/home/auto/python/ansible/testing.retry

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
10.1.1.5 : ok=0 changed=0 unreachable=0 failed=1

auto@automation:~/python/ansible$

- hosts: ios-xe  
gather\_facts: no  
connection: netconf

tasks:

- name: interface configuration  
netconf\_config:  
xml: |  
  
  
  
GigabitEthernet1/0/5  
testingbyyangsuite  
ianaift:ethernetCsmacd

---

<div class="post-metadata">

**Author:** ![Krishna\_Kotha](https://avatars.discourse-cdn.com/v4/letter/k/b782af/32.png) [@Krishna\_Kotha](https://forum.ansible.com/u/Krishna_Kotha)\
**Post date:** [October 27, 2018, 11:52pm UTC](https://forum.ansible.com/t/ansible-netconf-is-not-working-with-cisco-ios/28878/2 "2018-10-27T23:52:11Z")

</div>

Need help on this

---

<div class="post-metadata">

**Author:** ![ganeshrn](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ganeshrn/32/1021_2.png) [@ganeshrn](https://forum.ansible.com/u/ganeshrn)\
**Post date:** [October 29, 2018, 5:51pm UTC](https://forum.ansible.com/t/ansible-netconf-is-not-working-with-cisco-ios/28878/3 "2018-10-29T17:51:07Z")

</div>

Which Ansible version are you using?  
There was a similar issue reported on 2.7.0 [https://github.com/ansible/ansible/issues/46257](https://github.com/ansible/ansible/issues/46257)

This issue is fixed in 2.7.1 release. If you are still seeing this issue on 2.7.1 please raise a Github issue with relevant details.

Regards,  
Ganesh
