community.network.ce_snmp_user – Manages SNMP user configuration on HUAWEI CloudEngine switches.¶
Note
This plugin is part of the community.network collection (version 1.3.2).
To install it use: ansible-galaxy collection install community.network
.
To use it in a playbook, specify: community.network.ce_snmp_user
.
Parameters¶
Notes¶
Note
This module requires the netconf system service be enabled on the remote device being managed.
Recommended connection is
netconf
.This module also works with
local
connections for legacy playbooks.
Examples¶
- name: CloudEngine snmp user test
hosts: cloudengine
connection: local
gather_facts: no
vars:
cli:
host: "{{ inventory_hostname }}"
port: "{{ ansible_ssh_port }}"
username: "{{ username }}"
password: "{{ password }}"
transport: cli
tasks:
- name: "Config SNMP usm user"
community.network.ce_snmp_user:
state: present
usm_user_name: wdz_snmp
remote_engine_id: 800007DB03389222111200
acl_number: 2000
user_group: wdz_group
provider: "{{ cli }}"
- name: "Undo SNMP usm user"
community.network.ce_snmp_user:
state: absent
usm_user_name: wdz_snmp
remote_engine_id: 800007DB03389222111200
acl_number: 2000
user_group: wdz_group
provider: "{{ cli }}"
- name: "Config SNMP local user"
community.network.ce_snmp_user:
state: present
aaa_local_user: wdz_user
auth_protocol: md5
auth_key: huawei123
priv_protocol: des56
priv_key: huawei123
provider: "{{ cli }}"
- name: "Config SNMP local user"
community.network.ce_snmp_user:
state: absent
aaa_local_user: wdz_user
auth_protocol: md5
auth_key: huawei123
priv_protocol: des56
priv_key: huawei123
provider: "{{ cli }}"
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
wangdezhuang (@QijunPan)