ansible / ansible.builtin / v2.9.7 / module / pn_role CLI command to create/delete/modify role | "added in version" 2.8 of ansible.builtin" Authors: Pluribus Networks (@rajaspachipulusu17) preview | supported by communityansible.builtin.pn_role (v2.9.7) — module
pip
Install with pip install ansible==2.9.7
This module can be used to create, delete and modify user roles.
- name: Role create pn_role: pn_cliswitch: 'sw01' state: 'present' pn_name: 'foo' pn_scope: 'local' pn_access: 'read-only'
- name: Role delete pn_role: pn_cliswitch: 'sw01' state: 'absent' pn_name: 'foo'
- name: Role modify pn_role: pn_cliswitch: 'sw01' state: 'update' pn_name: 'foo' pn_access: 'read-write' pn_sudo: true pn_shell: true
state: choices: - present - absent - update description: - State the action to perform. Use C(present) to create role and C(absent) to delete role and C(update) to modify role. required: true type: str pn_name: description: - role name. required: true type: str pn_sudo: description: - allow sudo from shell. required: false type: bool pn_scope: choices: - local - fabric description: - local or fabric. required: false type: str pn_shell: description: - allow shell command. required: false type: bool pn_access: choices: - read-only - read-write description: - type of access. required: false type: str pn_cliswitch: description: - Target switch to run the CLI on. required: false type: str pn_running_config: description: - display running configuration of switch. required: false type: bool pn_delete_from_users: description: - delete from users. required: false type: bool
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 role command. returned: on error type: list stdout: description: set of responses from the role command. returned: always type: list