# Ansible and Huawei

**URL:** <https://forum.ansible.com/t/ansible-and-huawei/29361>\
**Category:** Ansible Project\
**Created:** [January 3, 2019, 6:26pm UTC](https://forum.ansible.com/t/ansible-and-huawei/29361 "2019-01-03T18:26:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anurag\_Bhatia](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@Anurag\_Bhatia](https://forum.ansible.com/u/Anurag_Bhatia)\
**Post date:** [January 3, 2019, 6:26pm UTC](https://forum.ansible.com/t/ansible-and-huawei/29361/1 "2019-01-03T18:26:17Z")

</div>

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)

---

<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:** [January 4, 2019, 8:16am UTC](https://forum.ansible.com/t/ansible-and-huawei/29361/2 "2019-01-04T08:16:21Z")

</div>

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](https://github.com/ncclient/ncclient/blob/master/examples/nc01.py)

Regards,  
Ganesh

---

<div class="post-metadata">

**Author:** ![Anurag\_Bhatia](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@Anurag\_Bhatia](https://forum.ansible.com/u/Anurag_Bhatia)\
**Post date:** [January 21, 2019, 11:34am UTC](https://forum.ansible.com/t/ansible-and-huawei/29361/3 "2019-01-21T11:34:46Z")

</div>

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.
