dellemc / dellemc.powerscale / 1.4.0 / module / dellemc_powerscale_group 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> preview | supported by communitydellemc.powerscale.dellemc_powerscale_group (1.4.0) — module
Install with ansible-galaxy collection install dellemc.powerscale:==1.4.0
collections: - name: dellemc.powerscale version: 1.4.0
Managing Groups on the PowerScale Storage System includes create group, delete group, get group, add users and remove users.
- 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"
- 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"
- 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"
- 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"
- 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"
- 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"
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 user_name or 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 group_id is auto generated at the time of creation. - For all other operations either group_name or group_id is needed. type: str group_name: description: - The name of the group. - Required at the time of group creation, for the rest of the operations either group_name or group_id is required. 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 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. - True - indicates that the SSL certificate should be verified. - 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, access_zone acts as an attribute for the group. - For all other operations 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 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 provider_type is '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
changed: description: Whether or not the resource has changed returned: always 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 type: complex