On this page
mellanox.onyx.onyx_snmp_hosts – Configures SNMP host parameters
Note
This plugin is part of the mellanox.onyx collection (version 1.0.0).
You might already have this collection installed if you are using the ansible
package. It is not included in ansible-core
. To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install mellanox.onyx
.
To use it in a playbook, specify: mellanox.onyx.onyx_snmp_hosts
.
New in version 0.2.0: of mellanox.onyx
Synopsis
- This module provides declarative management of SNMP hosts protocol params on Mellanox ONYX network devices.
Parameters
Parameter | Choices/Defaults | Comments | |
---|---|---|---|
hosts
list / elements=string
|
List of snmp hosts
|
||
auth_password
string
|
The password needed to configure the auth type.
|
||
auth_type
string
|
|
Configures SNMP v3 security parameters, specifying passwords in a nother parameter (auth_password) (passwords are always stored encrypted).
|
|
enabled
boolean
|
|
Temporarily Enables/Disables sending of all notifications to this host.
|
|
name
string / required
|
Specifies the name of the host.
|
||
notification_type
string
|
|
Configures the type of sending notification to the specified host.
|
|
port
string
|
Overrides default target port for this host.
|
||
privacy_password
string
|
The password needed to configure the privacy type.
|
||
privacy_type
string
|
|
Specifys SNMP v3 privacy settings for this user.
|
|
state
string
|
|
Used to decide if you want to delete the specified host or not.
|
|
user_name
string
|
Specifys username for this inform sink.
|
||
version
string
|
|
Specifys SNMP version of informs to send.
|
Examples
- 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
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
commands
list / elements=string
|
always |
The list of configuration mode commands to send to the device.
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>.']
|
Authors
- Sara Touqan (@sarato)
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/mellanox/onyx/onyx_snmp_hosts_module.html