HuaweiSwitch / CloudEngine-Ansible

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

执行ce_command的时候没有问题了,调用其它模块还是不行 #25

Closed lingjw closed 6 years ago

lingjw commented 7 years ago

[root@localhost bao]# ansible -m ce_vlan -a "commands='vlan_id=19 state=present' transport='cli' host=192.168.30.239 port=22 username=lingjingwei password=asd123... " localhost --connection local /usr/lib64/python2.6/site-packages/cryptography/init.py:26: DeprecationWarning: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. The next version of cryptography will drop support for Python 2.6 DeprecationWarning localhost | FAILED! => { "changed": false, "failed": true, "msg": "Unsupported parameters for (ce_vlan) module: commands. Supported parameters include: description,host,name,password,port,provider,state,timeout,transport,use_ssl,username,validate_certs,vlan_id,vlan_range" }

QijunPan commented 7 years ago

@lingjw 报错原因明很显,ce_vlan没有该参数,即,ce_vlan并没有commands参数,每个功能模块所支持的参数请参考:https://github.com/HuaweiSwitch/CloudEngine-Ansible/blob/master/docs/ce_module_docs.md#ce_vlan

同时,设备侧注意开启ssh和netconf,谢谢。

lingjw commented 7 years ago

谢谢提醒,目前已经可以使用

QijunPan commented 6 years ago

问题已经解决。

34538693 commented 6 years ago

@lingjw 能否把例子贴出来学习一下?