community / community.network / 0.2.1 / module / onyx_snmp_hosts Configures SNMP host parameters | "added in version" 0.2.0 of community.network" Authors: Sara Touqan (@sarato)community.network.onyx_snmp_hosts (0.2.1) — module
Install with ansible-galaxy collection install community.network:==0.2.1
collections: - name: community.network version: 0.2.1
This module provides declarative management of SNMP hosts protocol params on Mellanox ONYX network devices.
- name: Enables snmp host onyx_snmp_hosts: hosts: - name: 1.1.1.1 enabled: true
- name: Configures snmp host with version 2c onyx_snmp_hosts: hosts: - name: 2.3.2.4 enabled: true notification_type: trap port: 66 version: 2c
- name: Configures snmp host with version 3 and configures it with user as sara onyx_snmp_hosts: hosts: - name: 2.3.2.4 enabled: true notification_type: trap port: 66 version: 3 user_name: sara auth_type: sha auth_password: jnbdfijbdsf privacy_type: 3des privacy_password: nojfd8uherwiugfh
- name: Deletes the snmp host onyx_snmp_hosts: hosts: - name: 2.3.2.4 state: absent
hosts: description: - List of snmp hosts suboptions: auth_password: description: - The password needed to configure the auth type. type: str auth_type: choices: - md5 - sha - sha224 - sha256 - sha384 - sha512 description: - Configures SNMP v3 security parameters, specifying passwords in a nother parameter (auth_password) (passwords are always stored encrypted). type: str enabled: description: - Temporarily Enables/Disables sending of all notifications to this host. type: bool name: description: - Specifies the name of the host. required: true type: str notification_type: choices: - trap - inform description: - Configures the type of sending notification to the specified host. type: str port: description: - Overrides default target port for this host. type: str privacy_password: description: - The password needed to configure the privacy type. type: str privacy_type: choices: - 3des - aes-128 - aes-192 - aes-192-cfb - aes-256 - aes-256-cfb - des description: - Specifys SNMP v3 privacy settings for this user. type: str state: choices: - present - absent description: - Used to decide if you want to delete the specified host or not. type: str user_name: description: - Specifys username for this inform sink. type: str version: choices: - '1' - 2c - '3' description: - Specifys SNMP version of informs to send. type: str type: list
commands: description: The list of configuration mode commands to send to the device. returned: always sample: - snmp-server host <host_name> disable - no snmp-server host <host_name> disable - snmp-server host <host_name> informs port <port_number> version <version_number> - snmp-server host <host_name> traps port <port_number> version <version_number> - snmp-server host <host_name> informs port <port_number> version <version_number> user <user_name> auth <auth_type> <auth_password> priv <privacy_type> <privacy_password> - snmp-server host <host_name> traps port <port_number> version <version_number> user <user_name> auth <auth_type> <auth_password> priv <privacy_type> <privacy_password> - no snmp-server host <host_name>. type: list