onyx_username – Configure username module

Synopsis

  • This module provides declarative management of users/roles on Mellanox ONYX network devices.

Parameters

Parameter Choices/Defaults Comments
capability
string
    Choices:
  • monitor
  • unpriv
  • v_admin
  • admin
Grant capability to this user account
disabled
string
    Choices:
  • none
  • login
  • password
  • all
Disable means of logging into this account
disconnected
boolean
    Choices:
  • no ←
  • yes
Disconnect all sessions of this user
encrypted_password
boolean
    Choices:
  • no ←
  • yes
Decide the type of setted password (plain text or encrypted)
full_name
string
Set the full name of this user
nopassword
boolean
    Choices:
  • no ←
  • yes
Clear password for such user
password
string
Set password fot such user
reset_capability
boolean
    Choices:
  • no ←
  • yes
Reset capability to this user account
state
string
    Choices:
  • present ←
  • absent
Set state of the given account
username
string / required
Create/Edit user using username

Examples

- name: create new user
  onyx_username:
      username: anass

- name: set the user full-name
  onyx_username:
      username: anass
      full_name: anasshami

- name: set the user encrypted password
  onyx_username:
      username: anass
      password: 12345
      encrypted_password: True

- name: set the user capability
  onyx_username:
      username: anass
      capability: monitor

- name: reset the user capability
  onyx_username:
      username: anass
      reset_capability: True

- name: remove the user configuration
  onyx_username:
      username: anass
      state: absent

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:
['username *', 'username * password *', 'username * nopassword', 'username * disable login', 'username * capability admin', 'no username *', 'no username * disable']


Status

Authors

  • Anas Shami (@anass)

Hint

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