dellemc / dellemc.powerstore / 1.3.0 / module / dellemc_powerstore_protectionpolicy Perform Protection policy operations on PowerStore storage system. | "added in version" 1.0.0 of dellemc.powerstore" Authors: Arindam Datta (@dattaarindam) <ansible.team@dell.com>, P Srinivas Rao (@srinivas-rao5) <ansible.team@dell.com> preview | supported by communitydellemc.powerstore.dellemc_powerstore_protectionpolicy (1.3.0) — module
Install with ansible-galaxy collection install dellemc.powerstore:==1.3.0
collections: - name: dellemc.powerstore version: 1.3.0
Performs all protection policy operations on PowerStore Storage System. This modules supports get details of an existing protection policy. Create new protection policy with existing Snapshot Rule or replication rule. Modify protection policy to change the name and description, and add or remove existing snapshot rules/ replication rule. Delete an existing protection policy.
- name: Create a protection policy with snapshot rule and replication rule dellemc_powerstore_protectionpolicy: array_ip: "{{array_ip}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" name: "{{name}}" description: "{{description}}" snapshotrules: - "Ansible_test_snap_rule_1" replicationrule: "ansible_replication_rule_1" snapshotrule_state: "present-in-policy" state: "present"
- name : Modify protection policy, change name dellemc_powerstore_protectionpolicy: array_ip: "{{array_ip}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" name: "{{name}}" new_name: "{{new_name}}" state: "present"
- name : Modify protection policy, add snapshot rule dellemc_powerstore_protectionpolicy: array_ip: "{{array_ip}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" name: "{{name}}" snapshotrules: - "Ansible_test_snaprule_1" snapshotrule_state: "present-in-policy" state: "present"
- name : Modify protection policy, remove snapshot rule, replication rule dellemc_powerstore_protectionpolicy: array_ip: "{{array_ip}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" name: "{{name}}" snapshotrules: - "Ansible_test_to_be_removed" replicationrule: "" snapshotrule_state: "absent-in-policy" state: "present"
- name : Get details of protection policy by name dellemc_powerstore_protectionpolicy: array_ip: "{{array_ip}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" name: "{{name}}" state: "present"
- name : Get details of protection policy by ID dellemc_powerstore_protectionpolicy: array_ip: "{{array_ip}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" protectionpolicy_id: "{{protectionpolicy_id}}" state: "present"
- name : Delete protection policy dellemc_powerstore_protectionpolicy: array_ip: "{{array_ip}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" name: "{{name}}" state: "absent"
name: description: - String variable. Indicates the name of the protection policy. required: false type: str user: description: - The username of the PowerStore host. required: true type: str state: choices: - present - absent description: - String variable. Indicates the state of protection policy. - For Delete operation only, it should be set to "absent" - For all other operations like Create, Modify or Get details, it should be set to "present" required: true type: str array_ip: description: - IP or FQDN of the PowerStore management system. required: true type: str new_name: description: - String variable. Indicates the new name of the protection policy. - Used for renaming operation type: str password: description: - The password of the PowerStore host. required: true type: str verifycert: choices: - true - false description: - Boolean variable to specify whether to validate SSL certificate or not. - True - indicates that the SSL certificate should be verified. Set the environment variable REQUESTS_CA_BUNDLE to the path of the SSL certificate. - False - indicates that the SSL certificate should not be verified. required: true type: bool description: description: - String variable. Indicates the description of the protection policy. required: false type: str snapshotrules: description: - List of strings to specify the name or ids of snapshot rules which are to be added or removed, to or from, the protection policy. elements: str required: false type: list replicationrule: description: - The name or ids of the replcation rule which is to be added to the protection policy. - To remove the replication rule, an empty string has to be passed. required: false type: str snapshotrule_state: choices: - present-in-policy - absent-in-policy description: - String variable. Indicates the state of a snapshotrule in a protection policy. - When snapshot rules are specified, this variable is required. - present-in-policy indicates to add to protection policy. - absent-in-policy indicates to remove from protection policy. required: false type: str protectionpolicy_id: description: - String variable. Indicates the id of the protection policy. required: false type: str
changed: description: Whether or not the resource has changed. returned: always type: bool protectionpolicy_details: contains: description: description: description about the protection policy. type: str id: description: The system generated ID given to the protection policy. type: str name: description: Name of the protection policy. type: str replication_rules: contains: id: description: The replication rule ID of the protection policy. type: str name: description: The replication rule name of the protection policy. type: str description: The replication rule details of the protection policy. type: complex snapshot_rules: contains: id: description: The snapshot rule ID of the protection policy. type: str name: description: The snapshot rule name of the protection policy. type: str description: The snapshot rules details of the protection policy. type: complex type: description: The type for the protection policy type: str description: Details of the protection policy returned: When protection policy exists type: complex