Hi
Yes, tried that and it failed as well. Turned out netconf was not enabled at the device and for some reason I am not able to enable it either. Checking for device compatibility with netconf for now. Anyways, thanks for your help and input Ganesh. On Fri, Jan 4, 2019 at 1:46 PM Ganesh Nalawade <[email protected]> wrote: > > The error you are seeing is coming from ncclient library. > Are you able to connect to the device using a sample python script that uses > ncclinet library? > > Reference python script: > https://github.com/ncclient/ncclient/blob/master/examples/nc01.py > > Regards, > Ganesh > > On Thursday, 3 January 2019 23:57:01 UTC+5:30, Anurag Bhatia wrote: >> >> Hello there >> >> >> Was wondering if anyone has experience of using ansible with Huawei >> successfully? >> We are using Huawei at our IX and I am able to use ad-hoc commands with >> Huawei but playbooks based on documentation fail with a ncclient related >> error. We do have nc client as well as netconf installed on the machine. >> >> >> >> Our sample playbook (IP and access details are removed) >> >> >> --- >> - hosts: ###hidden### >> connection: local >> gather_facts: no >> vars: >> cli: >> host: ###hidden### >> port: ###hidden### >> username: ###hidden### >> password: ###hidden### >> transport: cli >> >> tasks: >> - name: Test port >> ce_switchport: >> interface: XGigabitEthernet0/0/44 >> mode: access >> access_vlan: 100 >> provider: '{{ cli }}' >> state: present >> >> >> >> >> and this throws the following error during execution: >> >> >> The full traceback is: >> Traceback (most recent call last): >> File "/usr/local/bin/ansible-connection", line 106, in start >> self.connection._connect() >> File >> "/Library/Python/2.7/site-packages/ansible/plugins/connection/netconf.py", >> line 288, in _connect >> ssh_config=ssh_config >> File "/Library/Python/2.7/site-packages/ncclient/manager.py", line 163, in >> connect >> return connect_ssh(*args, **kwds) >> File "/Library/Python/2.7/site-packages/ncclient/manager.py", line 128, in >> connect_ssh >> session.connect(*args, **kwds) >> File "/Library/Python/2.7/site-packages/ncclient/transport/ssh.py", line >> 485, in connect >> raise SSHError("Could not open connection, possibly due to unacceptable" >> SSHError: Could not open connection, possibly due to unacceptable SSH >> subsystem name. >> >> fatal: [$Host]: FAILED! => { >> "msg": "Could not open connection, possibly due to unacceptable SSH >> subsystem name." >> } >> >> >> >> Anyone with ideas on what could be wrong? >> >> >> Thanks! >> >> >> -- >> >> >> Anurag Bhatia >> anuragbhatia.com > > -- > 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/43884c30-4dff-406d-9464-e204a1afac89%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- Anurag Bhatia anuragbhatia.com -- 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/CAJ0%2BaXa71aX7CW0peZ5fdNKgfeEp-WqSWL8J%2Bq954kO_uzLzyw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
