onyx_snmp_users – Configures SNMP User parameters

Synopsis

  • This module provides declarative management of SNMP Users protocol params on Mellanox ONYX network devices.

Parameters

Parameter Choices/Defaults Comments
users
list
List of snmp users
auth_password
string
The password needed to configure the hash type.
auth_type
string
    Choices:
  • md5
  • sha
  • sha224
  • sha256
  • sha384
  • sha512
Configures the hash type used to configure SNMP v3 security parameters.
capability_level
string
    Choices:
  • admin
  • monitor
  • unpriv
  • v_admin
Sets capability level for SET requests.
enabled
boolean
    Choices:
  • no
  • yes
Enables/Disables SNMP v3 access for the user.
name
string / required
Specifies the name of the user.
require_privacy
boolean
    Choices:
  • no
  • yes
Enables/Disables the Require privacy (encryption) for requests from this user
set_access_enabled
boolean
    Choices:
  • no
  • yes
Enables/Disables SNMP SET requests for the user.

Examples

- name: enables snmp user
  onyx_snmp_users:
    users:
       - name: sara
         enabled: true

- name: enables snmp set requests
  onyx_snmp_users:
    users:
       - name: sara
         set_access_enabled: yes

- name: enables user require privacy
  onyx_snmp_users:
    users:
       - name: sara
         require_privacy: true

- name: configures user hash type
  onyx_snmp_users:
    users:
       - auth_type: md5
         auth_password: 1297sara1234sara

- name: configures user capability_level
  onyx_snmp_users:
    users:
        - name: sara
          capability_level: admin

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
commands
list
always
The list of configuration mode commands to send to the device.

Sample:
['snmp-server user <user_name> v3 enable', 'no snmp-server user <user_name> v3 enable', 'snmp-server user <user_name> v3 enable sets', 'no snmp-server user <user_name> v3 enable sets', 'snmp-server user <user_name> v3 require-privacy', 'no snmp-server user <user_name> v3 require-privacy', 'snmp-server user <user_name> v3 capability <capability_level>', 'snmp-server user <user_name> v3 auth <hash_type> <password>']


Status

Authors

  • Sara Touqan (@sarato)

Hint

If you notice any issues in this documentation, you can edit this document to improve it.