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 mellanox.onyx 0.2.0
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: |