dellemc / dellemc.powerstore / 3.2.0 / module / volumegroup Manage volume groups on a PowerStore Storage System | "added in version" 1.0.0 of dellemc.powerstore" Authors: Akash Shendge (@shenda1) <ansible.team@dell.com>, Arindam Datta (@dattaarindam) <ansible.team@dell.com>dellemc.powerstore.volumegroup (3.2.0) — module
Install with ansible-galaxy collection install dellemc.powerstore:==3.2.0
collections: - name: dellemc.powerstore version: 3.2.0
Managing volume group on PowerStore Storage System includes creating new volume group, adding volumes to volume group, removing volumes from volume group, clone of a volume group, refresh of a volume group and restore of volume group.
Module also include renaming volume group, modifying volume group, and deleting volume group.
- name: Create volume group without protection policy dellemc.powerstore.volumegroup: array_ip: "{{array_ip}}" validate_certs: "{{validate_certs}}" user: "{{user}}" password: "{{password}}" vg_name: "{{vg_name}}" description: "This volume group is for ansible" state: "present"
- name: Get details of volume group dellemc.powerstore.volumegroup: array_ip: "{{array_ip}}" validate_certs: "{{validate_certs}}" user: "{{user}}" password: "{{password}}" vg_name: "{{vg_name}}" state: "present"
- name: Add volumes to volume group dellemc.powerstore.volumegroup: array_ip: "{{array_ip}}" validate_certs: "{{validate_certs}}" user: "{{user}}" password: "{{password}}" vg_name: "{{vg_name}}" state: "present" volumes: - "7f879569-676c-4749-a06f-c2c30e09b295" - "68e4dad5-5de5-4644-a98f-6d4fb916e169" - "Ansible_Testing" vol_state: "present-in-group"
- name: Remove volumes from volume group dellemc.powerstore.volumegroup: array_ip: "{{array_ip}}" validate_certs: "{{validate_certs}}" user: "{{user}}" password: "{{password}}" vg_name: "{{vg_name}}" state: "present" volumes: - "7f879569-676c-4749-a06f-c2c30e09b295" - "Ansible_Testing" vol_state: "absent-in-group"
- name: Rename volume group and change is_write_order_consistent flag dellemc.powerstore.volumegroup: array_ip: "{{array_ip}}" validate_certs: "{{validate_certs}}" user: "{{user}}" password: "{{password}}" vg_name: "{{vg_name}}" new_vg_name: "{{new_vg_name}}" is_write_order_consistent: false state: "present"
- name: Get details of volume group by ID dellemc.powerstore.volumegroup: array_ip: "{{array_ip}}" validate_certs: "{{validate_certs}}" user: "{{user}}" password: "{{password}}" vg_id: "{{vg_id}}" state: "present"
- name: Delete volume group dellemc.powerstore.volumegroup: array_ip: "{{array_ip}}" validate_certs: "{{validate_certs}}" user: "{{user}}" password: "{{password}}" name: "{{new_vg_name}}" state: "absent"
- name: Refresh a volume group dellemc.powerstore.volumegroup: array_ip: "{{array_ip}}" validate_certs: "{{validate_certs}}" user: "{{user}}" password: "{{password}}" vg_name: "ansible_vg" source_vg: "vg_source" create_backup_snap: true backup_snap_profile: name: "test_snap" state: "present"
- name: Restore a volume group dellemc.powerstore.volumegroup: array_ip: "{{array_ip}}" validate_certs: "{{validate_certs}}" user: "{{user}}" password: "{{password}}" vg_name: "ansible_vg" source_snap: "snap_source" create_backup_snap: true backup_snap_profile: name: "test_snap_restore" state: "present"
- name: Clone a volume group dellemc.powerstore.volumegroup: array_ip: "{{array_ip}}" validate_certs: "{{validate_certs}}" user: "{{user}}" password: "{{password}}" vg_name: "ansible_vg" vg_clone: name: "ansible_vg_clone" protection_policy: "policy1" state: "present"
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 volume group should exist or not. required: true type: str vg_id: description: - The id of the volume group. - It can be used only for Modify, Add/Remove, or Delete operation. type: str timeout: default: 120 description: - Time after which the connection will get terminated. - It is to be mentioned in seconds. type: int vg_name: description: - The name of the volume group. type: str volumes: description: - This is a list of volumes. - Either the volume ID or name must be provided for adding/removing existing volumes from a volume group. - If volumes are given, then I(vol_state) should also be specified. elements: str type: list 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 vg_clone: description: - Parameters to support clone of a volume group. suboptions: description: description: - Description for the clone volume group. type: str name: description: - Name for the clone volume group. required: true type: str protection_policy: description: - ID or name of the protection policy to assign to the clone volume. type: str type: dict source_vg: description: - ID or name of the volume group to refresh from. type: str vol_state: choices: - present-in-group - absent-in-group description: - String variable. Describes the state of volumes inside a volume group. - If volume is given, then I(vol_state) should also be specified. type: str description: description: - Description about the volume group. type: str new_vg_name: description: - The new name of the volume group. type: str source_snap: description: - ID or name of the snapshot to restore from. 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 protection_policy: description: - String variable. Represents Protection policy id or name used for volume group. - Specifying an empty string or "" removes the existing protection policy from volume group. type: str create_backup_snap: description: - Specifies whether a backup snapshot set of the target volume group needs to be created before attempting refresh or restore. - If not specified it will be set to C(true). type: bool backup_snap_profile: description: - Snapshot volume group request. suboptions: description: description: - Description of the snapshot set. type: str expiration_timestamp: description: - Time after which the snapshot set can be auto-purged. type: str name: description: - Name of snapshot set to be created. type: str type: dict is_write_order_consistent: description: - A boolean flag to indicate whether Snapshot sets of the volume group will be write-order consistent. - If this parameter is not specified, the array by default sets it to C(true). type: bool
add_vols_to_vg: description: A boolean flag to indicate whether volume/s got added to volume group. returned: When value exists sample: 'false' type: bool changed: description: Whether or not the resource has changed. returned: always sample: 'false' type: bool create_vg: description: A boolean flag to indicate whether volume group got created. returned: When value exists sample: 'false' type: bool delete_vg: description: A boolean flag to indicate whether volume group got deleted. returned: When value exists sample: 'false' type: bool modify_vg: description: A boolean flag to indicate whether volume group got modified. returned: When value exists sample: 'false' type: bool remove_vols_from_vg: description: A boolean flag to indicate whether volume/s got removed from volume group. returned: When value exists sample: 'false' type: bool volume_group_details: contains: description: description: description about the volume group. type: str id: description: The system generated ID given to the volume group. type: str is_write_order_consistent: description: A boolean flag to indicate whether snapshot sets of the volume group will be write-order consistent. type: bool name: description: Name of the volume group. type: str protection_policy_id: description: The protection policy of the volume group. type: str snapshots: contains: id: description: ID of the snapshot. type: str name: description: Name of the snapshot. type: str description: The snapshots associated with the volume group. type: complex type: description: The type of the volume group. type: str volumes: contains: id: description: The system generated ID given to the volume associated with the volume group. type: str name: description: The name of the volume associated with the volume group. type: str description: The volumes details of the volume group. type: complex description: Details of the volume group. returned: When volume group exists sample: creation_timestamp: '2022-01-06T05:41:59.381459+00:00' description: Volume group created id: 634e4b95-e7bd-49e7-957b-6dc932642464 is_importing: false is_protectable: true is_replication_destination: false is_write_order_consistent: false location_history: null mapped_volumes: [] migration_session_id: null name: sample_volume_group placement_rule: Same_Appliance protection_data: copy_signature: null created_by_rule_id: null created_by_rule_name: null creator_type: User creator_type_l10n: User expiration_timestamp: null family_id: 634e4b95-e7bd-49e7-957b-6dc932642464 is_app_consistent: false parent_id: null source_id: null source_timestamp: null protection_policy: id: 4bbb6333-59e4-489c-9015-c618d3e8384b name: sample_protection_policy protection_policy_id: 4bbb6333-59e4-489c-9015-c618d3e8384b snapshots: - id: 2179802f-f975-434a-b317-9e55460e3e08 name: test_snapshot - id: 33d8990b-a468-4708-ba42-8b41af545939 name: backup.2022-08-04T10:57:41Z 001113180 type: Primary type_l10n: Primary volumes: [] type: complex