mellanox.onyx.onyx_snmp_hosts module – Configures SNMP host parameters
Note
This module 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 |
Comments |
---|---|
List of snmp hosts |
|
The password needed to configure the auth type. |
|
Configures SNMP v3 security parameters, specifying passwords in a nother parameter (auth_password) (passwords are always stored encrypted). Choices:
|
|
Temporarily Enables/Disables sending of all notifications to this host. Choices:
|
|
Specifies the name of the host. |
|
Configures the type of sending notification to the specified host. Choices:
|
|
Overrides default target port for this host. |
|
The password needed to configure the privacy type. |
|
Specifys SNMP v3 privacy settings for this user. Choices:
|
|
Used to decide if you want to delete the specified host or not. Choices:
|
|
Specifys username for this inform sink. |
|
Specifys SNMP version of informs to send. Choices:
|
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 |
Description |
---|---|
The list of configuration mode commands to send to the device. Returned: always Sample: [“snmp-server host \u003chost_name\u003e disable”, “no snmp-server host \u003chost_name\u003e disable”, “snmp-server host \u003chost_name\u003e informs port \u003cport_number\u003e version \u003cversion_number\u003e”, “snmp-server host \u003chost_name\u003e traps port \u003cport_number\u003e version \u003cversion_number\u003e”, “snmp-server host \u003chost_name\u003e informs port \u003cport_number\u003e version \u003cversion_number\u003e user \u003cuser_name\u003e auth \u003cauth_type\u003e \u003cauth_password\u003e priv \u003cprivacy_type\u003e \u003cprivacy_password\u003e”, “snmp-server host \u003chost_name\u003e traps port \u003cport_number\u003e version \u003cversion_number\u003e user \u003cuser_name\u003e auth \u003cauth_type\u003e \u003cauth_password\u003e priv \u003cprivacy_type\u003e \u003cprivacy_password\u003e”, “no snmp-server host \u003chost_name\u003e.”] |
Authors
Sara Touqan (@sarato)