Hi Everyone,
I work on a playbook to configure a Huawei CloudEngine S5735 but i’m stuck to SNMP V3 configuration.
Have you already configured huawei switches with Ansible?
Here are the simple command lines that work with the ce_command module:
snmp-agent sys-info version v3
snmp-agent mib-view included isoview iso
snmp-agent group v3 admin privacy read-view isoview write-view isoview notify-view isoview
snmp-agent target-host trap address udp-domain X.X.X.X params securityname XXXX v3
snmp-agent usm-user v3 XXXX
snmp-agent usm-user v3 XXXX group admin
snmp-agent protocol source-interface Vlanif999
When i indicate the authentication and privacy key encryption, that it doesn’t work with cli_command module
snmp-agent usm-user v3 XXXX authentication-mode sha2-256
snmp-agent usm-user v3 XXXX privacy-mode aes256
I don’t know how to interpreting prompts in my playbook when i send the keys
“Please configure the authentication password (8-255)”
“Enter Password:”
XXXXXX
“Confirm Password:”
XXXXXX
The result :
11:24:55 AM
TASK [Authentification V3] *****************************************************
11:24:58 AM
ok: [X.X.X.X] => (item=system-view)
11:25:28 AM
failed: [X.X.X.X] (item=snmp-agent usm-user v3 XXXXX authentication-mode sha2-256) => {“ansible_loop_var”: “item”, “changed”: false, “item”: “snmp-agent usm-user v3 XXXX authentication-mode sha2-256”, “msg”: “command timeout triggered, timeout value is 30 secs.\nSee the timeout setting options in the Network Debug and Troubleshooting Guide.”}
Here is the ansible configuration :
ansible_connection=network_cli
ansible_network_os=ce
Module
cli_command
ce_command