Which Ansible version are you using?
There was a similar issue reported on 
2.7.0 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


On Saturday, 27 October 2018 00:10:01 UTC+5:30, Krishna Kotha wrote:
>
> 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\"><bad-element>default-operation</bad-element>\\n</error-info>\\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: |
>           <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
>             <interfaces 
> xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
>               <interface>
>                 <name>GigabitEthernet1/0/5</name>
>                 <description>testingbyyangsuite</description>
>                 <type 
> xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
>               </interface>
>             </interfaces>
>           </config>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f095be47-4d2b-433f-bbb6-eaa6691e980d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to