dellemc / dellemc.powerscale / 1.4.0 / module / dellemc_powerscale_synciqpolicy Manage SyncIQ policies on PowerScale | "added in version" 1.3.0 of dellemc.powerscale" Authors: Spandita Panigrahi (@panigs7) <ansible.team@dell.com> preview | supported by communitydellemc.powerscale.dellemc_powerscale_synciqpolicy (1.4.0) — module
Install with ansible-galaxy collection install dellemc.powerscale:==1.4.0
collections: - name: dellemc.powerscale version: 1.4.0
Managing SyncIQ policies on PowerScale includes create a SyncIQ policy, modify a SyncIQ policy, get details of a SyncIQ policy, creating jobs on SyncIQ policy
- name: Create SyncIQ policy dellemc_powerscale_synciqpolicy: onefs_host: "{{onefs_host}}" verify_ssl: "{{verify_ssl}}" api_user: "{{api_user}}" api_password: "{{api_password}}" action: "copy" description: "Creating a policy" enabled: True policy_name: "New_policy" run_job: "on-schedule" schedule: "every 1 days at 12:00 PM" skip_when_source_unmodified: True rpo_alert: 100 source_cluster: source_root_path: "<path_to_source>" source_exclude_directories: "<path_to_exclude>" source_include_directories: "<path_to_include>" source_network: pool: "pool0" subnet: "subnet0" target_cluster: target_host: "198.10.xxx.xxx" target_path: "<path_to_target>" target_certificate_id: "7sdgvejkiau7629903048hdjdkljsbwgsuasj7169823kkckll" target_snapshot: target_snapshot_archive: True target_snapshot_expiration: 90 exp_time_unit: "day" state: "present"
- name: Modify SyncIQ policy dellemc_powerscale_synciqpolicy: onefs_host: "{{onefs_host}}" verify_ssl: "{{verify_ssl}}" api_user: "{{api_user}}" api_password: "{{api_password}}" policy_name: "New_policy" action: "sync" description: "Creating a policy" enabled: False run_job: "when-snapshot-taken" snapshot_sync_patten: "^snapshot\\-$latest" source_cluster: source_root_path: "<path_to_source>" source_exclude_directories: "<path_to_exclude>" source_include_directories: "<path_to_include>" source_network: pool: "pool1" subnet: "subnet1" target_cluster: target_host: "198.10.xxx.xxx" target_path: "<path_to_target>" target_certificate_id: "7sdgvejkiau7629903048hdjdkljsbwgsuasj716iuhywthsjk" target_snapshot: target_snapshot_archive: False state: "present"
- name: Rename a SyncIQ policy dellemc_powerscale_synciqpolicy: onefs_host: "{{onefs_host}}" api_user: "{{api_user}}" api_password: "{{api_password}}" verify_ssl: "{{verify_ssl}}" policy_id: "d63b079d34adf2d2ec3ce92f15bfc730" new_policy_name: "Policy_Rename" state: "present"
- name: Get SyncIQ policy details dellemc_powerscale_synciqpolicy: onefs_host: "{{onefs_host}}" api_user: "{{api_user}}" api_password: "{{api_password}}" verify_ssl: "{{verify_ssl}}" policy_name: "Policy_rename" state: "present"
- name: Create a job on SyncIQ policy dellemc_powerscale_synciqpolicy: onefs_host: "{{onefs_host}}" api_user: "{{api_user}}" api_password: "{{api_password}}" verify_ssl: "{{verify_ssl}}" policy_name: "Test_SSL" job_params: action: "run" source_snapshot: "TestSIQ-snapshot" wait_for_completion: False state: "present"
- name: Create a resync_prep job on SyncIQ policy dellemc_powerscale_synciqpolicy: onefs_host: "{{onefs_host}}" api_user: "{{api_user}}" api_password: "{{api_password}}" verify_ssl: "{{verify_ssl}}" policy_name: "Test_SSL" job_params: action: "resync_prep" source_snapshot: "TestSIQ-snapshot" wait_for_completion: False state: "present"
- name: Allow writes on target of SyncIQ policy dellemc_powerscale_synciqpolicy: onefs_host: "{{onefs_host}}" api_user: "{{api_user}}" api_password: "{{api_password}}" verify_ssl: "{{verify_ssl}}" policy_name: "Test_SSL" job_params: action: "allow_write" source_snapshot: "TestSIQ-snapshot" workers_per_node: 3 wait_for_completion: False state: "present"
- name: Disallow writes on target of SyncIQ policy dellemc_powerscale_synciqpolicy: onefs_host: "{{onefs_host}}" api_user: "{{api_user}}" api_password: "{{api_password}}" verify_ssl: "{{verify_ssl}}" policy_name: "Test_SSL" job_params: action: "allow_write_revert" source_snapshot: "TestSIQ-snapshot" workers_per_node: 3 wait_for_completion: False state: "present"
- name: Delete SyncIQ policy by policy name dellemc_powerscale_synciqpolicy: onefs_host: "{{onefs_host}}" api_user: "{{api_user}}" api_password: "{{api_password}}" verify_ssl: "{{verify_ssl}}" policy_name: "Policy_rename" state: "absent"
- name: Delete SyncIQ policy by policy ID dellemc_powerscale_synciqpolicy: onefs_host: "{{onefs_host}}" api_user: "{{api_user}}" api_password: "{{api_password}}" verify_ssl: "{{verify_ssl}}" policy_id: "d63b079d34adf2d2ec3ce92f15bfc730" state: "absent"
state: choices: - absent - present description: - The state option is used to determine whether the policy exists or not. required: true type: str action: choices: - sync - copy description: - Indicates type of replication action to be performed on the source type: str enabled: description: - Indicates whether policy is enabled or disabled type: bool port_no: default: '8080' description: - Port number of the PowerScale cluster.It defaults to 8080 if not specified. required: false type: str run_job: choices: - on-schedule - when-source-modified - when-snapshot-taken description: - Types of scheduling a job on the policy type: str api_user: description: - username of the PowerScale cluster. required: true type: str schedule: description: - Schedule set when run_policy is 'on-schedule' - It must be in isidate format. - If the format is not proper an error will be thrown. type: str job_delay: description: - If run_job is set to when-source-modified, job_delay is the duration to wait before triggering a job once there is modification on source. type: int policy_id: description: - The policy_id is auto generated at the time of creation. - For get/modify operations either policy_name or policy_id is needed. - Parameters policy_name and policy_id are mutually exclusive. type: str rpo_alert: description: - If run_job is set to 'on-schedule' is set to a time/date, an alert is created if the specified RPO for this policy is exceeded. - The default value is 0, which will not generate RPO alerts. type: int job_params: description: - Specifies the parameters to create a job on SyncIQ policy suboptions: action: choices: - run - resync_prep - allow_write - allow_write_revert description: - The action to be taken by this job. required: true type: str source_snapshot: description: - An optional snapshot to copy/sync from. type: str wait_for_completion: default: false description: - Specifies if the job should run synchronously or asynchronously. By default the job is created to run asynchronously. type: bool workers_per_node: description: - Specifies the desired workers per node. This parameter is valid for allow_write, and allow_write_revert operation. This is an optional parameter and it defaults to 3. type: int type: dict onefs_host: description: - IP address or FQDN of the PowerScale cluster. required: true type: str verify_ssl: choices: - true - false description: - boolean variable to specify whether to validate SSL certificate or not. - True - indicates that the SSL certificate should be verified. - False - indicates that the SSL certificate should not be verified. required: true type: bool description: description: - Description of the policy type: str policy_name: description: - The name of the policy. - Required at the time of policy creation, for the rest of the operations either policy_name or policy_id is required. type: str api_password: description: - the password of the PowerScale cluster. required: true type: str job_delay_unit: choices: - seconds - minutes - hours - days default: seconds description: - Unit for job_delay. type: str rpo_alert_unit: choices: - minutes - hours - days - weeks - months - years default: minutes description: - Unit for rpo_alert. type: str source_cluster: description: - Defines the details of source_cluster. suboptions: source_exclude_directories: description: - List of path to the directories that should be excluded while running a policy. - For example, if we want to exclude directory 'exclude1' at location '/ifs/source', then the source_exclude_directories will be '/ifs/source/exclude1'. elements: str type: list source_include_directories: description: - List of path to the directories that should be included while running a policy - For example, if we want to include directory 'include1' at location '/ifs/source', then the source_exclude_directories will be '/ifs/source/include1'. elements: str type: list source_network: description: - Run the policy only on nodes in the specified subnet and pool. suboptions: pool: description: - The pool to restrict replication policies to. type: str subnet: description: - The subnet to restrict replication policies to. type: str type: dict source_root_path: description: - The root directory on the source cluster where the files will be synced from. - Source root path should begin with /ifs. For example, if we want to create a synciq policy for the directory 'source' in the base path /ifs, then the source_root_path will be '/ifs/source'. type: str type: dict target_cluster: description: - Details of the target cluster. suboptions: target_certificate_id: description: - The ID of the target cluster certificate being used for encryption - This parameter is not supported by isi_sdk_8_1_1 type: str target_certificate_name: description: - The name of the target cluster certificate being used for encryption - Parameters target_certficate_name and target_certificate_id are mutually exclusive - This parameter is not supported by isi_sdk_8_1_1 type: str target_host: description: - Host IP or FQDN where we want to replicate the source. type: str target_path: description: - The directory location to have the replicated source data at. type: str type: dict new_policy_name: description: - The new name of the policy while renaming an existing policy. - policy_name or policy_id is required together with new_policy_name. type: str target_snapshot: description: - Details of snapshots to be created at the target. suboptions: exp_time_unit: choices: - years - months - weeks - days default: years description: - Unit of target_snapshot expiration time. type: str target_snapshot_archive: description: - Indicates whether to take snapshot of the target. type: bool target_snapshot_expiration: description: - Expiration time of snapshot. - Value 0 means no expiration. type: int type: dict snapshot_sync_pattern: description: - The naming pattern that a snapshot must match to trigger a sync when the schedule is when-snapshot-taken. type: str skip_when_source_unmodified: description: - If true and schedule is set , the policy will not run if no changes have been made to the contents of the source directory since the last job successfully completed. - Option modifiable when run_job is "on_schedule". type: bool
changed: description: Whether or not the resource has changed returned: always type: bool synciq_policy_details: contains: action: description: Type of action for the policy type: str enabled: description: Indicates whether policy is enabled type: bool id: description: ID of the policy. type: str jobs: description: List of jobs running on the policy type: list name: description: The name of the policy. type: str schedule: description: Type of schedule chosen to run a policy type: str source_root_path: description: The path to the source directory to be replicated type: str target_host: description: The IP/FQDN of the host where source is replicated type: str target_path: description: The target directory where source is replicated type: str description: Details of the SyncIQ policy returned: When SyncIQ policy exists type: complex target_synciq_policy_details: contains: failover_failback_state: description: The state of the policy with respect to sync failover/failback. type: str id: description: ID of the policy. type: str name: description: The name of the policy. type: str description: Details of the target SyncIQ policy returned: When failover/failback is performed on target cluster type: complex