dellemc / dellemc.powermax / 3.0.0 / module / metrodr Manage metro DR environment on PowerMax/VMAX Storage System | "added in version" 1.4.0 of dellemc.powermax" Authors: Vivek Soni (@v-soni11) <ansible.team@dell.com>, Rajshree Khare (@khareRajshree) <ansible.team@dell.com>dellemc.powermax.metrodr (3.0.0) — module
Install with ansible-galaxy collection install dellemc.powermax:==3.0.0
collections: - name: dellemc.powermax version: 3.0.0
Managing a metro DR environment on a PowerMax storage system includes getting details of any specific metro DR environment, creating a metro DR environment, converting an existing SG into a metro DR environment, modifying metro DR environment attributes and deleting a metro DR environment.
- name: Get metro environment details dellemc.powermax.metrodr: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" metro_r1_array_id: "{{metro_r1_array_id}}" env_name: "ansible_metrodr_env" state: "present"
- name: Convert SG to metro DR environment dellemc.powermax.metrodr: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" sg_name: "ansible_sg" env_name: "ansible_metrodr_env" metro_r1_array_id: "{{metro_r1_array_id}}" metro_r2_array_id: "{{metro_r2_array_id}}" dr_array_id: "{{dr_array_id}}" replication_mode: "Asynchronous" wait_for_completion: false state: "present"
- name: Create metro DR environment dellemc.powermax.metrodr: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" sg_name: "ansible_sg" env_name: "ansible_metrodr_env" metro_r1_array_id: "{{metro_r1_array_id}}" metro_r2_array_id: "{{metro_r2_array_id}}" dr_array_id: "{{dr_array_id}}" replication_mode: "Asynchronous" new_rdf_group_r1: true new_rdf_group_r2: true wait_for_completion: false state: "present"
- name: Modify metro DR environment dellemc.powermax.metrodr: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" metro_r1_array_id: "{{metro_r1_array_id}}" env_name: "ansible_metrodr_env" srdf_param: srdf_state: "Suspend" metro: true dr: true keep_r2: true wait_for_completion: true state: "present"
- name: Delete metro DR environment dellemc.powermax.metrodr: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" metro_r1_array_id: "{{metro_r1_array_id}}" env_name: "ansible_metrodr_env" remove_r1_dr_rdfg: true state: 'absent'
user: description: - The username of the Unisphere host. required: true type: str state: choices: - absent - present description: - State variable to determine whether metro DR environment will exist or not. required: true type: str sg_name: description: - Name of the storage group. - Storage group will be present on the primary metro array and a storage group with the same name will be created on remote and DR arrays in a create operation. - Storage group name is required in 'create metro DR environment' and 'convert SG into metro DR environment' operations. required: false type: str timeout: default: 120 description: - Time after which the connection will get terminated. - It is to be mentioned in seconds. type: int env_name: description: - Name of the metro DR environment. - Metro DR environment name will be unique across PowerMax. required: true type: str password: description: - The password of the Unisphere host. required: true type: str srdf_param: description: - It contains parameters related to SRDF links. - It is used only in modify operations. required: false suboptions: dr: default: false description: - The flag indicates whether or not to direct srdf_state change towards device pairs on the disaster recovery leg of the metro DR environment. required: false type: bool keep_r2: default: false description: - The flag indicates whether or not in the case of srdf state suspend to make R2 data on metro available to the host. required: false type: bool metro: default: false description: - The flag indicates whether or not to direct srdf_state change towards the R1--R2 Metro Device leg of the metro DR environment. required: false type: bool srdf_state: choices: - Split - Restore - SetMode - Failback - Failover - Establish - Suspend - UpdateR1 - Recover description: - State of the SRDF link. - It is a mandatory parameter for modify operations. required: true type: str type: dict universion: choices: - 91 - 92 - 100 - 101 description: - Unisphere version, currently '91', '92', '100' and '101' versions are supported. required: false type: int verifycert: description: - Specifies system whether to validate SSL certificate or not, Values can be True or False or a custom file path for SSL certificate with .pem extension or .cer with base 64 encoding. required: true type: str dr_array_id: description: - Serial number of the DR array. - It is required in create and convert operations. required: false type: str unispherehost: description: - IP or FQDN of the Unisphere host required: true type: str new_rdf_group_r1: default: true description: - The flag indicates whether or not to create a new RDFG for a Metro R1 array to a DR array, or to autoselect from an existing one. - Used in only create operation. required: false type: bool new_rdf_group_r2: default: true description: - The flag indicates whether or not to create a new RDFG for a Metro R2 array to a DR array, or to autoselect from an existing one. - It is used only in create operation. required: false type: bool replication_mode: choices: - Asynchronous - Adaptive Copy description: - Replication mode whose value will indicate how the data will be replicated. - It is required in create and modify operations. - It is a mandatory parameter in a create operation but optional in a modify operation. required: false type: str metro_r1_array_id: description: - Serial number of the primary metro array. required: true type: str metro_r2_array_id: description: - Serial number of the remote metro array. - It is required only in create and convert operations. required: false type: str remove_r1_dr_rdfg: default: false description: - The flag indicates whether or not to override default behavior and delete R11-R2 RDFG from the metro R1 side. - It is used only in delete operations. required: false type: bool wait_for_completion: default: false description: - The flag indicates if the operation should be run synchronously or asynchronously. - True signifies synchronous execution. - By default, create and convert are asynchronous operations, whereas modify is a synchronous operation. required: false type: bool
Job_details: contains: completed_date_milliseconds: description: Date of job completion in milliseconds. type: int jobId: description: Unique identifier of the job. type: str last_modified_date: description: Last modified date of job. type: str last_modified_date_milliseconds: description: Last modified date of job in milliseconds. type: int name: description: Name of the job. type: str resourceLink: description: Resource link w.r.t Unisphere. type: str result: description: Job description type: str status: description: Status of the job. type: str task: description: Details about the job. type: list username: description: Unisphere username. type: str description: Details of the job. returned: When job exist. type: dict changed: description: Whether or not the resource has changed. returned: always type: bool metrodr_env_details: contains: capacity_gb: description: Size of volume in GB. type: float dr_exempt: description: Flag to indication that if there are exempt devices (volumes) in the DR site or not. type: bool dr_link_state: description: Status of DR site. type: str dr_percent_complete: description: Percentage synchronized in DR session. type: int dr_rdf_mode: description: Replication mode with DR site. type: str dr_remain_capacity_to_copy_mb: description: Remaining capacity to copy at DR site. type: int dr_service_state: description: The HA state of the DR session. type: str dr_state: description: The pair states of the DR session. type: str environment_exempt: description: Flag to indication that if there are exempt devices (volumes) in the environment or not. type: bool environment_state: description: The state of the smart DR environment. type: str metro_exempt: description: Flag to indication that if there are exempt devices (volumes) in the DR site or not. type: bool metro_link_state: description: Status of metro site. type: str metro_r1_array_health: description: Health status of metro R1 array. type: str metro_r2_array_health: description: Health status of metro R1 array. type: str metro_service_state: description: The HA state of the metro session. type: str metro_state: description: The pair states of the metro session. type: str metro_witness_state: description: The witness state of the metro session. type: str name: description: The smart DR environment name. type: str valid: description: Flag to indicate whether valid environment or not. type: bool description: Details of the metro DR environment link. returned: When environment exists. type: dict