dellemc.powerstore.ldap_account (3.2.0) — module

Manage LDAP Account for PowerStore

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

Authors: Trisha Datta (@Trisha_Datta) <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

Managing LDAP accounts on PowerStore Storage System includes creating an LDAP account, getting details of LDAP accounts, modifying an LDAP account, and deleting an LDAP account.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create an LDAP account
  dellemc.powerstore.ldap_account:
    array_ip: "{{array_ip}}"
    validate_certs: "{{validate_certs}}"
    user: "{{user}}"
    password: "{{password}}"
    ldap_account_name: "ldap_user_account_1"
    ldap_domain_id: "1"
    role_name: "Administrator"
    ldap_account_type: "User"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get the details of the LDAP account by name
  dellemc.powerstore.ldap_account:
    array_ip: "{{array_ip}}"
    validate_certs: "{{validate_certs}}"
    user: "{{user}}"
    password: "{{password}}"
    ldap_account_name: "ldap_user_account_1"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get the details of the LDAP account by id
  dellemc.powerstore.ldap_account:
    array_ip: "{{array_ip}}"
    validate_certs: "{{validate_certs}}"
    user: "{{user}}"
    password: "{{password}}"
    ldap_account_id: "3"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Modify an LDAP account
  dellemc.powerstore.ldap_account:
    array_ip: "{{array_ip}}"
    validate_certs: "{{validate_certs}}"
    user: "{{user}}"
    password: "{{password}}"
    ldap_account_name: "ldap_user_account_1"
    role_name: "2"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete an LDAP account
  dellemc.powerstore.ldap_account:
    array_ip: "{{array_ip}}"
    validate_certs: "{{validate_certs}}"
    user: "{{user}}"
    password: "{{password}}"
    ldap_account_id: "3"
    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 LDAP account should exist or not.
    - For Delete operation only, it should be set to C(absent).
    - For all other operations except delete, it should be set to C(present).
    required: true
    type: str

role_id:
    description:
    - Unique identifier of the role to which the new LDAP account will be mapped.
    type: int

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

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

role_name:
    description:
    - Name of the role to which the new LDAP account will be mapped.
    type: str

ldap_domain_id:
    description:
    - Unique identifier of the LDAP domain to which LDAP user or group belongs.
    type: int

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

ldap_account_id:
    description:
    - Unique identifier of the LDAP account.
    type: int

ldap_domain_name:
    description:
    - Name of the LDAP domain to which LDAP user or group belongs.
    type: str

ldap_account_name:
    description:
    - Name of the new LDAP account to be created.
    - This has to match to the LDAP user or group in LDAP server to which the LDAP account
      is mapped.
    type: str

ldap_account_type:
    choices:
    - User
    - Group
    description:
    - Type of LDAP account.
    type: str

Outputs

changed:
  description: Whether or not the resource has changed.
  returned: always
  sample: 'false'
  type: bool
ldap_account_details:
  contains:
    dn:
      description: Types of directory service protocol.
      type: str
    domain_id:
      description: Unique identifier of the LDAP domain to which LDAP user or group
        belongs.
      type: int
    id:
      description: Unique identifier of the LDAP account.
      type: int
    name:
      description: Name of the LDAP account.
      type: str
    role_id:
      description: Unique identifier of the role to which the LDAP account is mapped.
      type: int
    type:
      description: Type of LDAP account.
      type: str
  description: Details of the LDAP account.
  returned: When LDAP account exists.
  sample:
    dn: cn=sample_ldap_user,dc=ldap,dc=com
    domain_id: '2'
    id: '5'
    name: sample_ldap_user
    role_id: '1'
    type: User
    type_l10n: User
  type: complex