dellemc.powerstore.local_user (3.2.0) — module

Local user operations for PowerStore Storage System

| "added in version" 1.3.0 of dellemc.powerstore"

Authors: Arindam Datta (@dattaarindam) <ansible.team@dell.com>

Install collection

Install with ansible-galaxy collection install dellemc.powerstore:==3.2.0


Add to requirements.yml

  collections:
    - name: dellemc.powerstore
      version: 3.2.0

Description

Supports the provisioning operations on a Local user such as create, modify, delete and get the details of a local user.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create local user
  dellemc.powerstore.local_user:
    array_ip: "{{array_ip}}"
    validate_certs: "{{validate_certs}}"
    user: "{{user}}"
    password: "{{password}}"
    user_name: "ansible_user_1"
    user_password: "Password123#"
    role_name: "role_1"
    is_locked: false
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get the details local user with user id
  dellemc.powerstore.local_user:
    array_ip: "{{array_ip}}"
    validate_certs: "{{validate_certs}}"
    user: "{{user}}"
    password: "{{password}}"
    user_id: "{{user_id}}"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get the details local user with user name
  dellemc.powerstore.local_user:
    array_ip: "{{array_ip}}"
    validate_certs: "{{validate_certs}}"
    user: "{{user}}"
    password: "{{password}}"
    user_name: "ansible_user_1"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Modify attributes of local user
  dellemc.powerstore.local_user:
    array_ip: "{{array_ip}}"
    validate_certs: "{{validate_certs}}"
    user: "{{user}}"
    password: "{{password}}"
    user_name: "ansible_user_1"
    user_password: "Password123#"
    new_password: "Ansible123#"
    role_id: 4
    is_locked: true
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete local user
  dellemc.powerstore.local_user:
    array_ip: "{{array_ip}}"
    validate_certs: "{{validate_certs}}"
    user: "{{user}}"
    password: "{{password}}"
    user_name: "ansible_user_1"
    state: "absent"

Inputs

    
port:
    description:
    - Port number for the PowerStore array.
    - If not passed, it will take 443 as default.
    type: int

user:
    description:
    - The username of the PowerStore host.
    required: true
    type: str

state:
    choices:
    - absent
    - present
    description:
    - Define whether the local user should exist or not.
    required: true
    type: str

role_id:
    description:
    - The unique identifier of the role to which the local user account will be mapped.
    - It is mutually exclusive with I(role_name).
    type: int

timeout:
    default: 120
    description:
    - Time after which the connection will get terminated.
    - It is to be mentioned in seconds.
    type: int

user_id:
    description:
    - Unique identifier of the local user account.
    - Mutually exclusive with I(user_name).
    type: str

array_ip:
    description:
    - IP or FQDN of the PowerStore management system.
    required: true
    type: str

password:
    description:
    - The password of the PowerStore host.
    required: true
    type: str

is_locked:
    description:
    - Whether the user account is locked or not.
    - Defaults to C(false) at creation time.
    type: bool

role_name:
    description:
    - The name of the role to which the local user account will be mapped.
    - It is mutually exclusive with I(role_id).
    type: str

user_name:
    description:
    - Name of the local user account. Mutually exclusive with I(user_id).
    - Mandatory only for create operation.
    type: str

new_password:
    description:
    - New password for the existing local user account.
    type: str

user_password:
    description:
    - Password for the new local user account to be created.
    - Mandatory only for create operation.
    type: str

validate_certs:
    aliases:
    - verifycert
    default: true
    description:
    - Boolean variable to specify whether to validate SSL certificate or not.
    - C(true) - indicates that the SSL certificate should be verified. Set the environment
      variable REQUESTS_CA_BUNDLE to the path of the SSL certificate.
    - C(false) - indicates that the SSL certificate should not be verified.
    type: bool

Outputs

changed:
  description: Whether or not the resource has changed.
  returned: always
  sample: 'false'
  type: bool
local_user_details:
  contains:
    id:
      description: The system generated ID given to the local user.
      type: str
    is_built_in:
      description: Whether the user account is built-in or not.
      type: bool
    is_default_password:
      description: Whether the user account has a default password or not. Only applies
        to default user accounts
      type: bool
    is_locked:
      description: Whether the user account is locked or not. Defaults to false at
        creation time.
      type: bool
    name:
      description: Name of the local user.
      type: str
    role_id:
      description: Unique identifier of the role local user account is mapped to.
      type: str
    role_name:
      description: Name of the role to which local user account is mapped.
      type: str
  description: Details of the local user.
  returned: When local user exists
  sample:
    id: '272'
    is_built_in: false
    is_default_password: false
    is_locked: false
    name: sampleuser
    role_id: '1'
    role_name: Administrator
  type: complex