HuaweiSwitch / CloudEngine-Ansible

Ansible modules to automate HUAWEI CloudEngine switches
GNU General Public License v3.0
144 stars 51 forks source link

Authorization Failure using "ce_interface" Module #76

Open yeongwei opened 5 years ago

yeongwei commented 5 years ago
  1. The following Ansible code did not work,

    #  - name: Set Something 2
    #    ce_interface:
    #     interface: "25GE1/1/15"
    #     desscription: "Testing"
    #     provider: "{{ cli }}"
    #     transport: cli
  2. Error thrown from the above code,

    
    The full traceback is:
    Traceback (most recent call last):
    File "/bin/ansible-connection", line 104, in start
    self.connection._connect()
    File "/usr/lib/python2.7/site-packages/ansible/plugins/connection/netconf.py", line 322, in _connect
    ssh_config=ssh_config
    File "/usr/lib/python2.7/site-packages/ncclient/manager.py", line 177, in connect
    return connect_ssh(*args, **kwds)
    File "/usr/lib/python2.7/site-packages/ncclient/manager.py", line 143, in connect_ssh
    session.connect(*args, **kwds)
    File "/usr/lib/python2.7/site-packages/ncclient/transport/ssh.py", line 491, in connect
    self._auth(username, password, key_filenames, allow_agent, look_for_keys)
    File "/usr/lib/python2.7/site-packages/ncclient/transport/ssh.py", line 590, in _auth
    raise AuthenticationError(repr(saved_exception))
    AuthenticationError: AuthenticationException('Authentication failed.',)

fatal: [localhost]: FAILED! => { "msg": "AuthenticationException('Authentication failed.',)" }


3. Appreciate any thoughts. Thanks!
yuandongx commented 4 years ago

请检查交换机上的netconf的配置 使用ansible >= 2.8.6 并参考https://docs.ansible.com/ansible/devel/network/user_guide/platform_ce.html?highlight=cloudengine 谢谢!