dellemc / dellemc.unity / 1.2.1 / module / dellemc_unity_consistencygroup Manage consistency groups on Unity storage system | "added in version" 1.1.0 of dellemc.unity" Authors: Akash Shendge (@shenda1) <ansible.team@dell.com> preview | supported by communitydellemc.unity.dellemc_unity_consistencygroup (1.2.1) — module
Install with ansible-galaxy collection install dellemc.unity:==1.2.1
collections: - name: dellemc.unity version: 1.2.1
Managing the consistency group on the Unity storage system includes creating new consistency group, adding volumes to consistency group, removing volumes from consistency group, mapping hosts to consistency group, unmapping hosts from consistency group, renaming consistency group, modifying attributes of consistency group and deleting consistency group.
- name: Create consistency group dellemc.unity.dellemc_unity_consistencygroup: unispherehost: "{{unispherehost}}" verifycert: "{{verifycert}}" username: "{{username}}" password: "{{password}}" cg_name: "{{cg_name}}" description: "{{description}}" snap_schedule: "{{snap_schedule1}}" state: "present"
- name: Get details of consistency group using id dellemc.unity.dellemc_unity_consistencygroup: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" verifycert: "{{verifycert}}" cg_id: "{{cg_id}}" state: "present"
- name: Add volumes to consistency group dellemc.unity.dellemc_unity_consistencygroup: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" verifycert: "{{verifycert}}" cg_id: "{{cg_id}}" volumes: - vol_name: "Ansible_Test-3" - vol_id: "sv_1744" vol_state: "{{vol_state_present}}" state: "present"
- name: Rename consistency group dellemc.unity.dellemc_unity_consistencygroup: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" verifycert: "{{verifycert}}" cg_name: "{{cg_name}}" new_cg_name: "{{new_cg_name}}" state: "present"
- name: Modify consistency group details dellemc.unity.dellemc_unity_consistencygroup: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" verifycert: "{{verifycert}}" cg_name: "{{new_cg_name}}" snap_schedule: "{{snap_schedule2}}" tiering_policy: "{{tiering_policy1}}" state: "present"
- name: Map hosts to a consistency group dellemc.unity.dellemc_unity_consistencygroup: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" verifycert: "{{verifycert}}" cg_id: "{{cg_id}}" hosts: - host_name: "10.226.198.248" - host_id: "Host_511" mapping_state: "mapped" state: "present"
- name: Unmap hosts from a consistency group dellemc.unity.dellemc_unity_consistencygroup: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" verifycert: "{{verifycert}}" cg_id: "{{cg_id}}" hosts: - host_id: "Host_511" - host_name: "10.226.198.248" mapping_state: "unmapped" state: "present"
- name: Remove volumes from consistency group dellemc.unity.dellemc_unity_consistencygroup: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" verifycert: "{{verifycert}}" cg_name: "{{new_cg_name}}" volumes: - vol_name: "Ansible_Test-3" - vol_id: "sv_1744" vol_state: "{{vol_state_absent}}" state: "present"
- name: Delete consistency group dellemc.unity.dellemc_unity_consistencygroup: unispherehost: "{{unispherehost}}" username: "{{username}}" password: "{{password}}" verifycert: "{{verifycert}}" cg_name: "{{new_cg_name}}" state: "absent"
port: default: 443 description: - Port number through which communication happens with Unity management server. required: false type: int cg_id: description: - The ID of the consistency group. - It can be used only for get, modify, add/remove volumes, or delete operations. required: false type: str hosts: description: - This is a list of hosts. - Either the host ID or name must be provided for mapping/unmapping hosts for a consistency group. - If hosts are given, then mapping_state should also be specified. - Hosts cannot be mapped to a consistency group, if the consistency group has no volumes. - When a consistency group is being mapped to the host, users should not use the volume module to map the volumes in the consistency group to hosts. elements: dict suboptions: host_id: description: - The ID of the host. type: str host_name: description: - The name of the host. type: str type: list state: choices: - absent - present description: - Define whether the consistency group should exist or not. required: true type: str cg_name: description: - The name of the consistency group. - It is mandatory for the create operation. - Specify either cg_name or cg_id (but not both) for any operation. required: false 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 consistency group. - If volumes are given, then vol_state should also be specified. - Volumes cannot be added/removed from consistency group, if the consistency group or the volume has snapshots. elements: dict suboptions: vol_id: description: - The ID of the volume. type: str vol_name: description: - The name of the volume. type: str type: list password: description: - The password of the Unity management server. required: true type: str username: description: - The username of the Unity management server. required: true type: str vol_state: choices: - present-in-group - absent-in-group description: - String variable, describes the state of volumes inside consistency group. - If volumes are given, then vol_state should also be specified. type: str verifycert: choices: - true - false default: true description: - Boolean variable to specify whether or not to validate SSL certificate. - True - Indicates that the SSL certificate should be verified. - False - Indicates that the SSL certificate should not be verified. required: false type: bool description: description: - Description of the consistency group. type: str new_cg_name: description: - The new name of the consistency group, used in rename operation. type: str mapping_state: choices: - mapped - unmapped description: - String variable, describes the state of hosts inside the consistency group. - If hosts are given, then mapping_state should also be specified. type: str snap_schedule: description: - Snapshot schedule assigned to the consistency group. - Specifying an empty string "" removes the existing snapshot schedule from consistency group. type: str unispherehost: description: - IP or FQDN of the Unity management server. required: true type: str tiering_policy: choices: - AUTOTIER_HIGH - AUTOTIER - HIGHEST - LOWEST description: - Tiering policy choices for how the storage resource data will be distributed among the tiers available in the pool. type: str
changed: description: Whether or not the resource has changed. returned: always sample: true type: bool consistency_group_details: contains: block_host_access: contains: UnityBlockHostAccessList: contains: UnityBlockHostAccess: contains: id: description: The ID of the host type: str name: description: The name of the host type: str description: Details of host type: complex description: List of hosts mapped to consistency group type: complex description: Details of hosts mapped to the consistency group type: complex id: description: The system ID given to the consistency group type: str luns: contains: UnityLunList: contains: UnityLun: contains: id: description: The system ID given to volume type: str name: description: The name of the volume type: str description: Detail of volume type: complex description: List of volumes part of consistency group type: complex description: Details of volumes part of consistency group type: complex relocation_policy: description: FAST VP tiering policy for the consistency group type: str snap_schedule: contains: UnitySnapSchedule: contains: id: description: The system ID given to the snapshot schedule type: str name: description: The name of the snapshot schedule type: str description: Snapshot schedule applied to consistency group type: complex description: Snapshot schedule applied to consistency group type: complex snapshots: contains: creation_time: description: Date and time on which the snapshot was taken type: str expirationTime: description: Date and time after which the snapshot will expire type: str name: description: Name of the snapshot type: str storageResource: contains: UnityStorageResource: contains: id: description: The id of the storage resource type: str description: Details of the storage resource type: complex description: Storage resource for which the snapshot was taken type: complex description: List of snapshots of consistency group type: complex description: Details of the consistency group. returned: When consistency group exists type: complex