mellanox.onyx.onyx_username module – Configure username module
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_username
.
New in version 0.2.0: of mellanox.onyx
Synopsis
This module provides declarative management of users/roles on Mellanox ONYX network devices.
Parameters
Parameter |
Comments |
---|---|
Grant capability to this user account Choices:
|
|
Disable means of logging into this account Choices:
|
|
Disconnect all sessions of this user Choices:
|
|
Decide the type of setted password (plain text or encrypted) Choices:
|
|
Set the full name of this user |
|
Clear password for such user Choices:
|
|
Set password fot such user |
|
Reset capability to this user account Choices:
|
|
Set state of the given account Choices:
|
|
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 |
Description |
---|---|
The list of configuration mode commands to send to the device. Returned: always Sample: [“username *”, “username * password *”, “username * nopassword”, “username * disable login”, “username * capability admin”, “no username *”, “no username * disable”] |
Authors
Anas Shami (@anass)