dellemc.powerscale.group (3.0.0) — module

Manage Groups on the PowerScale Storage System

| "added in version" 1.2.0 of dellemc.powerscale"

Authors: P Srinivas Rao (@srinivas-rao5) <ansible.team@dell.com>

Install collection

Install with ansible-galaxy collection install dellemc.powerscale:==3.0.0


Add to requirements.yml

  collections:
    - name: dellemc.powerscale
      version: 3.0.0

Description

Managing Groups on the PowerScale Storage System includes create group, delete group, get group, add users and remove users.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create a Group
  dellemc.powerscale.group:
    onefs_host: "{{onefs_host}}"
    api_user: "{{api_user}}"
    api_password: "{{api_password}}"
    verify_ssl: "{{verify_ssl}}"
    access_zone: "{{access_zone}}"
    provider_type: "{{provider_type}}"
    group_name: "{{group_name}}"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create a Group with group id
  dellemc.powerscale.group:
    onefs_host: "{{onefs_host}}"
    api_user: "{{api_user}}"
    api_password: "{{api_password}}"
    verify_ssl: "{{verify_ssl}}"
    access_zone: "{{access_zone}}"
    provider_type: "{{provider_type}}"
    group_name: "Test_group"
    group_id: 7000
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create Group with Users
  dellemc.powerscale.group:
    onefs_host: "{{onefs_host}}"
    api_user: "{{api_user}}"
    api_password: "{{api_password}}"
    verify_ssl: "{{verify_ssl}}"
    provider_type: "{{provider_type}}"
    access_zone: "{{access_zone}}"
    group_name: "{{group_name}}"
    users:
      - user_name: "{{user_name}}"
      - user_id: "{{user_id}}"
      - user_name: "{{user_name_2}}"
    user_state: "present-in-group"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get Details of the Group using Group Id
  dellemc.powerscale.group:
    onefs_host: "{{onefs_host}}"
    api_user: "{{api_user}}"
    api_password: "{{api_password}}"
    verify_ssl: "{{verify_ssl}}"
    provider_type: "{{provider_type}}"
    access_zone: "{{access_zone}}"
    group_id: "{{group_id}}"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete the Group using Group Name
  dellemc.powerscale.group:
    onefs_host: "{{onefs_host}}"
    api_user: "{{api_user}}"
    api_password: "{{api_password}}"
    verify_ssl: "{{verify_ssl}}"
    provider_type: "{{provider_type}}"
    access_zone: "{{access_zone}}"
    group_name: "{{group_name}}"
    state: "absent"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Add Users to a Group
  dellemc.powerscale.group:
    onefs_host: "{{onefs_host}}"
    api_user: "{{api_user}}"
    api_password: "{{api_password}}"
    verify_ssl: "{{verify_ssl}}"
    provider_type: "{{provider_type}}"
    access_zone: "{{access_zone}}"
    group_id: "{{group_id}}"
    users:
      - user_name: "{{user_name}}"
      - user_id: "{{user_id}}"
      - user_name: "{{user_name_2}}"
    user_state: "present-in-group"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove Users from a Group
  dellemc.powerscale.group:
    onefs_host: "{{onefs_host}}"
    api_user: "{{api_user}}"
    api_password: "{{api_password}}"
    verify_ssl: "{{verify_ssl}}"
    provider_type: "{{provider_type}}"
    access_zone: "{{access_zone}}"
    group_id: "{{group_id}}"
    users:
      - user_name: "{{user_name_1}}"
      - user_id: "{{user_id}}"
      - user_name: "{{user_name_2}}"
    user_state: "absent-in-group"
    state: "present"

Inputs

    
state:
    choices:
    - absent
    - present
    description:
    - The state option is used to determine whether the group will exist or not.
    required: true
    type: str

users:
    description:
    - Either I(user_name) or I(user_id) is needed to add or remove the user from the group.
    - Users can be part of multiple groups.
    elements: dict
    type: list

port_no:
    default: '8080'
    description:
    - Port number of the PowerScale cluster.It defaults to 8080 if not specified.
    required: false
    type: str

api_user:
    description:
    - username of the PowerScale cluster.
    required: true
    type: str

group_id:
    description:
    - The I(group_id) is auto generated or can be assigned at the time of creation.
    - For all other operations either I(group_name) or I(group_id) is needed.
    type: int

group_name:
    description:
    - The name of the group.
    type: str

onefs_host:
    description:
    - IP address or FQDN of the PowerScale cluster.
    required: true
    type: str

user_state:
    choices:
    - present-in-group
    - absent-in-group
    description:
    - The I(user_state) option is used to  determine whether the users will exist for
      a particular group or not.
    - It is required when users are added or removed from a group.
    type: str

verify_ssl:
    choices:
    - true
    - false
    description:
    - boolean variable to specify whether to validate SSL certificate or not.
    - C(true) - indicates that the SSL certificate should be verified.
    - C(false) - indicates that the SSL certificate should not be verified.
    required: true
    type: bool

access_zone:
    default: system
    description:
    - This option mentions the zone in which a group is created.
    - For creation, I(access_zone) acts as an attribute for the group.
    - For all other operations I(access_zone) acts as a filter.
    type: str

api_password:
    description:
    - the password of the PowerScale cluster.
    required: true
    type: str

provider_type:
    choices:
    - local
    - file
    - ldap
    - ads
    - nis
    default: local
    description:
    - This option defines the type which will be used to authenticate the group members.
    - Creation, Deletion and Modification is allowed only for local group.
    - Details of groups of all provider types can be fetched.
    - If the I(provider_type) is C(ads) then the domain name of the Active Directory Server
      has to be mentioned in the group_name. The format for the group_name should be 'DOMAIN_NAME\group_name'
      or "DOMAIN_NAME\\group_name".
    - This option acts as a filter for all operations except creation.
    type: str

Outputs

changed:
  description: Whether or not the resource has changed.
  returned: always
  sample: 'false'
  type: bool
group_details:
  contains:
    gid:
      contains:
        id:
          description: The id of the group.
          type: str
        name:
          description: The name of the group.
          type: str
        type_of_resource:
          description: The resource's type is mentioned.
          sample: group
          type: str
      description: The details of the primary group for the user.
      type: complex
    members:
      contains:
        sid:
          contains:
            id:
              description: The unique security identifier of the resource.
              type: str
            name:
              description: The name of the resource.
              type: str
            type_of_resource:
              description: The resource's type is mentioned.
              sample: user
              type: str
          description: The details of the associated resource.
          type: complex
      description: The list of sid's the members of group.
      type: complex
    name:
      description: The name of the group.
      type: str
    provider:
      description: The provider contains the provider type and access zone.
      sample: lsa-local-provider:system
      type: str
  description: Details of the group.
  returned: When group exists
  sample:
    dn: CN=group_11,CN=Groups,DC=VXXXXX-CX
    dns_domain: null
    domain: VXXXXX-CX
    generated_gid: false
    gid:
      id: GID:2000
      name: group_11
      type: group
    id: group_11
    member_of: null
    members: []
    name: group_11
    object_history: []
    provider: lsa-local-provider:System
    sam_account_name: group_11
    sid:
      id: SID:S-1-0-11-1111111111-1111111111-1111111111-00000
      name: group_11
      type: group
    type: group
  type: complex