ansible / ansible.builtin / v2.9.27 / module / pn_user CLI command to create/modify/delete user | "added in version" 2.8 of ansible.builtin" Authors: Pluribus Networks (@rajaspachipulusu17) preview | supported by communityansible.builtin.pn_user (v2.9.27) — module
pip
Install with pip install ansible==2.9.27
This module can be used to create a user and apply a role, update a user and delete a user.
- name: Create user pn_user: pn_cliswitch: "sw01" state: "present" pn_scope: "fabric" pn_password: "foo123" pn_name: "foo"
- name: Delete user pn_user: pn_cliswitch: "sw01" state: "absent" pn_name: "foo"
- name: Modify user pn_user: pn_cliswitch: "sw01" state: "update" pn_password: "test1234" pn_name: "foo"
state: choices: - present - absent - update description: - State the action to perform. Use C(present) to create user and C(absent) to delete user C(update) to update user. required: true type: str pn_name: description: - username. type: str pn_scope: choices: - local - fabric description: - local or fabric. type: str pn_password: description: - plain text password. type: str pn_cliswitch: description: - Target switch to run the CLI on. required: false type: str pn_initial_role: description: - initial role for user. type: str
changed: description: indicates whether the CLI caused changes on the target. returned: always type: bool command: description: the CLI command run on the target node. returned: always type: str stderr: description: set of error responses from the user command. returned: on error type: list stdout: description: set of responses from the user command. returned: always type: list