dellemc.unity.consistencygroup module – Manage consistency groups on Unity storage system
Note
This module is part of the dellemc.unity collection (version 1.6.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install dellemc.unity
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: dellemc.unity.consistencygroup
.
New in dellemc.unity 1.1.0
Synopsis
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, enabling replication in consistency group, disabling replication in consistency group and deleting consistency group.
Requirements
The below requirements are needed on the host that executes this module.
A Dell Unity Storage device version 5.1 or later.
Ansible-core 2.12 or later.
Python 3.9, 3.10 or 3.11.
Storops Python SDK 1.2.11.
Parameters
Parameter |
Comments |
---|---|
The ID of the consistency group. It can be used only for get, modify, add/remove volumes, or delete operations. |
|
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. |
|
Description of the consistency group. |
|
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. |
|
The ID of the host. |
|
The name of the host. |
|
String variable, describes the state of hosts inside the consistency group. If hosts are given, then mapping_state should also be specified. Choices:
|
|
The new name of the consistency group, used in rename operation. |
|
The password of the Unity management server. |
|
Port number through which communication happens with Unity management server. Default: |
|
Settings required for enabling replication. |
|
Name of the destination consistency group. Default value will be source consistency group name prefixed by ‘DR_’. |
|
Id of pool to allocate destination Luns. Mutually exclusive with destination_pool_name. |
|
Name of pool to allocate destination Luns. Mutually exclusive with destination_pool_id. |
|
Details of remote system to which the replication is being configured. The remote_system option should be specified if the replication_type is |
|
IP or FQDN for remote Unity unisphere Host. |
|
Password of remote Unity unisphere Host. |
|
Port at which remote Unity unisphere is hosted. Default: |
|
User name of remote Unity unisphere Host. |
|
Boolean variable to specify whether or not to validate SSL certificate of remote Unity unisphere Host.
Choices:
|
|
The replication mode. Choices:
|
|
Type of replication. Choices:
|
|
Maximum time to wait before the system syncs the source and destination LUNs. Option rpo should be specified if the replication_mode is The value should be in range of |
|
State of the replication. Choices:
|
|
Snapshot schedule assigned to the consistency group. Specifying an empty string “” removes the existing snapshot schedule from consistency group. |
|
Define whether the consistency group should exist or not. Choices:
|
|
Tiering policy choices for how the storage resource data will be distributed among the tiers available in the pool. Choices:
|
|
IP or FQDN of the Unity management server. |
|
The username of the Unity management server. |
|
Boolean variable to specify whether or not to validate SSL certificate.
Choices:
|
|
String variable, describes the state of volumes inside consistency group. If volumes are given, then vol_state should also be specified. Choices:
|
|
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. |
|
The ID of the volume. |
|
The name of the volume. |
Notes
Note
The check_mode is not supported.
The modules present in this collection named as ‘dellemc.unity’ are built to support the Dell Unity storage platform.
Examples
- name: Create consistency group
dellemc.unity.consistencygroup:
unispherehost: "{{unispherehost}}"
validate_certs: "{{validate_certs}}"
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.consistencygroup:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
cg_id: "{{cg_id}}"
state: "present"
- name: Add volumes to consistency group
dellemc.unity.consistencygroup:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
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.consistencygroup:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
cg_name: "{{cg_name}}"
new_cg_name: "{{new_cg_name}}"
state: "present"
- name: Modify consistency group details
dellemc.unity.consistencygroup:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
cg_name: "{{new_cg_name}}"
snap_schedule: "{{snap_schedule2}}"
tiering_policy: "{{tiering_policy1}}"
state: "present"
- name: Map hosts to a consistency group
dellemc.unity.consistencygroup:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
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.consistencygroup:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
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.consistencygroup:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
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.consistencygroup:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
cg_name: "{{new_cg_name}}"
state: "absent"
- name: Enable replication for consistency group
dellemc.unity.consistencygroup:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
cg_id: "cg_id_1"
replication_params:
destination_cg_name: "destination_cg_1"
replication_mode: "asynchronous"
rpo: 60
replication_type: "remote"
remote_system:
remote_system_host: '10.1.2.3'
remote_system_verifycert: False
remote_system_username: 'username'
remote_system_password: 'password'
destination_pool_name: "pool_test_1"
replication_state: "enable"
state: "present"
- name: Disable replication for consistency group
dellemc.unity.consistencygroup:
unispherehost: "{{unispherehost}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
cg_name: "dis_repl_ans_source"
replication_state: "disable"
state: "present"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Whether or not the resource has changed. Returned: always Sample: |
|
Details of the consistency group. Returned: When consistency group exists Sample: |
|
Details of hosts mapped to the consistency group. Returned: success |
|
List of hosts mapped to consistency group. Returned: success |
|
Details of host. Returned: success |
|
The ID of the host. Returned: success |
|
The name of the host. Returned: success |
|
Whether or not the replication is enabled.. Returned: success |
|
The system ID given to the consistency group. Returned: success |
|
Details of volumes part of consistency group. Returned: success |
|
List of volumes part of consistency group. Returned: success |
|
Detail of volume. Returned: success |
|
The system ID given to volume. Returned: success |
|
The name of the volume. Returned: success |
|
FAST VP tiering policy for the consistency group. Returned: success |
|
Snapshot schedule applied to consistency group. Returned: success |
|
Snapshot schedule applied to consistency group. Returned: success |
|
The system ID given to the snapshot schedule. Returned: success |
|
The name of the snapshot schedule. Returned: success |
|
List of snapshots of consistency group. Returned: success |
|
Date and time on which the snapshot was taken. Returned: success |
|
Date and time after which the snapshot will expire. Returned: success |
|
Name of the snapshot. Returned: success |
|
Storage resource for which the snapshot was taken. Returned: success |
|
Details of the storage resource. Returned: success |
|
The id of the storage resource. Returned: success |