dellemc.powerflex.replication_consistency_group module – Manage replication consistency groups on Dell PowerFlex
Note
This module is part of the dellemc.powerflex collection (version 1.9.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.powerflex
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: dellemc.powerflex.replication_consistency_group
.
New in dellemc.powerflex 1.5.0
Synopsis
Managing replication consistency groups on PowerFlex storage system includes getting details, creating, modifying, creating snapshots, pause, resume, freeze, unfreeze, activate, failover, reverse, restore, sync, switchover, inactivate and deleting a replication consistency group.
Requirements
The below requirements are needed on the host that executes this module.
A Dell PowerFlex storage system version 3.5 or later.
Ansible-core 2.13 or later.
PyPowerFlex 1.8.0.
Python 3.9, 3.10 or 3.11.
Parameters
Parameter |
Comments |
---|---|
Activity mode of RCG. This parameter is supported for version 3.6 and above. Choices:
|
|
Whether to create the snapshot of the replication consistency group. Choices:
|
|
Force switchover the RCG. Choices:
|
|
Freeze or unfreeze the RCG. This parameter is deprecated. Use rcg_state instead. Choices:
|
|
IP or FQDN of the PowerFlex host. |
|
Consistency of RCG. Choices:
|
|
Name of RCG to rename to. |
|
The password of the PowerFlex host. |
|
Pause or resume the RCG. This parameter is deprecated. Use rcg_state instead. Choices:
|
|
Pause mode. It is required if pause is set as true. Choices:
|
|
Port number through which communication happens with PowerFlex host. Default: |
|
Protection domain id. Mutually exclusive with protection_domain_name. |
|
Protection domain name. Mutually exclusive with protection_domain_id. |
|
The ID of the replication consistency group. Mutually exclusive with rcg_name. |
|
The name of the replication consistency group. It is unique across the PowerFlex array. Mutually exclusive with rcg_id. |
|
Specify an action for RCG. Failover the RCG. Reverse the RCG. Restore the RCG. Switchover the RCG. Pause or resume the RCG. Freeze or unfreeze the RCG. Synchronize the RCG. Choices:
|
|
Remote peer system. |
|
IP or FQDN of the remote peer gateway host. |
|
The password of the remote peer gateway host. |
|
Port number through which communication happens with remote peer gateway host. Default: |
|
Remote protection domain id. Mutually exclusive with protection_domain_name. |
|
Remote protection domain name. Mutually exclusive with protection_domain_id. |
|
Time after which connection will get terminated. It is to be mentioned in seconds. Default: |
|
The username of the remote peer gateway host. |
|
Boolean variable to specify whether or not to validate SSL certificate.
Choices:
|
|
Desired RPO in seconds. |
|
State of the replication consistency group. Choices:
|
|
Target volume access mode. Choices:
|
|
Time after which connection will get terminated. It is to be mentioned in seconds. Default: |
|
The username of the PowerFlex host. |
|
Boolean variable to specify whether or not to validate SSL certificate.
Choices:
|
Notes
Note
The check_mode is supported.
Idempotency is not supported for create snapshot operation.
There is a delay in reflection of final state of RCG after few update operations on RCG.
In 3.6 and above, the replication consistency group will return back to consistent mode on changing to inconsistent mode if consistence barrier arrives. Hence idempotency on setting to inconsistent mode will return changed as true.
The modules present in the collection named as ‘dellemc.powerflex’ are built to support the Dell PowerFlex storage platform.
Examples
- name: Get RCG details
dellemc.powerflex.replication_consistency_group:
hostname: "{{hostname}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
port: "{{port}}"
rcg_name: "{{rcg_name}}"
- name: Create a snapshot of the RCG
dellemc.powerflex.replication_consistency_group:
hostname: "{{hostname}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
port: "{{port}}"
rcg_id: "{{rcg_id}}"
create_snapshot: true
state: "present"
- name: Create a replication consistency group
dellemc.powerflex.replication_consistency_group:
hostname: "{{hostname}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
port: "{{port}}"
rcg_name: "rcg_test"
rpo: 60
protection_domain_name: "domain1"
activity_mode: "active"
remote_peer:
hostname: "{{hostname}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
port: "{{port}}"
protection_domain_name: "domain1"
- name: Modify replication consistency group
dellemc.powerflex.replication_consistency_group:
hostname: "{{hostname}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
port: "{{port}}"
rcg_name: "rcg_test"
rpo: 60
target_volume_access_mode: "ReadOnly"
activity_mode: "Inactive"
is_consistent: true
- name: Rename replication consistency group
dellemc.powerflex.replication_consistency_group:
hostname: "{{hostname}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
port: "{{port}}"
rcg_name: "rcg_test"
new_rcg_name: "rcg_test_rename"
- name: Pause replication consistency group
dellemc.powerflex.replication_consistency_group:
hostname: "{{hostname}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
port: "{{port}}"
rcg_name: "rcg_test"
rcg_state: "pause"
pause_mode: "StopDataTransfer"
- name: Resume replication consistency group
dellemc.powerflex.replication_consistency_group:
hostname: "{{hostname}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
port: "{{port}}"
rcg_name: "rcg_test"
rcg_state: "resume"
- name: Freeze replication consistency group
dellemc.powerflex.replication_consistency_group:
hostname: "{{hostname}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
port: "{{port}}"
rcg_name: "rcg_test"
rcg_state: "freeze"
- name: UnFreeze replication consistency group
dellemc.powerflex.replication_consistency_group:
hostname: "{{hostname}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
port: "{{port}}"
rcg_name: "rcg_test"
rcg_state: "unfreeze"
- name: Failover replication consistency group
dellemc.powerflex.replication_consistency_group:
hostname: "{{hostname}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
port: "{{port}}"
rcg_name: "rcg_test"
rcg_state: "failover"
- name: Reverse replication consistency group
dellemc.powerflex.replication_consistency_group:
hostname: "{{hostname}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
port: "{{port}}"
rcg_name: "rcg_test"
rcg_state: "reverse"
- name: Restore replication consistency group
dellemc.powerflex.replication_consistency_group:
hostname: "{{hostname}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
port: "{{port}}"
rcg_name: "rcg_test"
rcg_state: "restore"
- name: Switchover replication consistency group
dellemc.powerflex.replication_consistency_group:
hostname: "{{hostname}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
port: "{{port}}"
rcg_name: "rcg_test"
rcg_state: "switchover"
- name: Synchronize replication consistency group
dellemc.powerflex.replication_consistency_group:
hostname: "{{hostname}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
port: "{{port}}"
rcg_name: "rcg_test"
rcg_state: "sync"
- name: Delete replication consistency group
dellemc.powerflex.replication_consistency_group:
hostname: "{{hostname}}"
username: "{{username}}"
password: "{{password}}"
validate_certs: "{{validate_certs}}"
port: "{{port}}"
rcg_name: "rcg_test"
state: "absent"
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 replication consistency group. Returned: When replication consistency group exists Sample: |
|
The abstract state of the replication consistency group. Returned: success |
|
Whether the local replication consistency group is active. Returned: success |
|
Whether the remote replication consistency group is active Returned: success |
|
The current consistency mode of the replication consistency group. Returned: success |
|
The state of disaster recovery of the local replication consistency group. Returned: success |
|
The error code of the replication consistency group. Returned: success |
|
The state of failover of the replication consistency group. Returned: success |
|
The type of failover of the replication consistency group. Returned: success |
|
The freeze state of the replication consistency group. Returned: success |
|
The ID of the replication consistency group. Returned: success |
|
The reason for the inactivity of the replication consistency group. Returned: success |
|
The return code of the last snapshot of the replication consistency group. Returned: success |
|
ID of the last snapshot of the replication consistency group. Returned: success |
|
The Lifetime state of the replication consistency group. Returned: success |
|
The state of activity of the local replication consistency group. Returned: success |
|
The name of the replication consistency group. Returned: success |
|
The Lifetime state of the replication consistency group. Returned: success |
|
The ID of the peer MDM of the replication consistency group. Returned: success |
|
The Protection Domain ID of the replication consistency group. Returned: success |
|
The state of activity of the remote replication consistency group.. Returned: success |
|
The state of disaster recovery of the remote replication consistency group. Returned: success |
|
The ID of the remote replication consistency group. Returned: success |
|
The ID of the remote MDM of the replication consistency group. Returned: success |
|
The ID of the remote Protection Domain. Returned: success |
|
The Name of the remote Protection Domain. Returned: success |
|
The direction of the replication of the replication consistency group. Returned: success |
|
The RPO value of the replication consistency group in seconds. Returned: success |
|
Whether the process of snapshot creation of the replication consistency group is in progress or not. Returned: success |
|
The access mode of the target volume of the replication consistency group. Returned: success |
|
The type of the replication consistency group. Returned: success |