diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-18 05:52:35 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-18 05:52:35 +0000 |
commit | 7fec0b69a082aaeec72fee0612766aa42f6b1b4d (patch) | |
tree | efb569b86ca4da888717f5433e757145fa322e08 /ansible_collections/dellemc/unity/playbooks/modules/snapshotschedule.yml | |
parent | Releasing progress-linux version 7.7.0+dfsg-3~progress7.99u1. (diff) | |
download | ansible-7fec0b69a082aaeec72fee0612766aa42f6b1b4d.tar.xz ansible-7fec0b69a082aaeec72fee0612766aa42f6b1b4d.zip |
Merging upstream version 9.4.0+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/dellemc/unity/playbooks/modules/snapshotschedule.yml')
-rw-r--r-- | ansible_collections/dellemc/unity/playbooks/modules/snapshotschedule.yml | 203 |
1 files changed, 203 insertions, 0 deletions
diff --git a/ansible_collections/dellemc/unity/playbooks/modules/snapshotschedule.yml b/ansible_collections/dellemc/unity/playbooks/modules/snapshotschedule.yml new file mode 100644 index 000000000..f2859a06a --- /dev/null +++ b/ansible_collections/dellemc/unity/playbooks/modules/snapshotschedule.yml @@ -0,0 +1,203 @@ +--- +- name: Snapshot schedule operations on Unity + hosts: localhost + connection: local + gather_facts: false + vars: + unispherehost: '10.*.*.*' + validate_certs: false + username: 'admin' + password: 'Password123!' + state_present: 'present' + state_absent: 'absent' + + tasks: + - name: Create snapshot schedule (Rule Type - every_n_hours) + register: result + dellemc.unity.snapshotschedule: + unispherehost: "{{ unispherehost }}" + validate_certs: "{{ validate_certs }}" + username: "{{ username }}" + password: "{{ password }}" + name: "Ansible_Every_N_Hours_Testing" + type: "every_n_hours" + interval: 6 + desired_retention: 24 + state: "{{ state_present }}" + + - name: Set id + ansible.builtin.set_fact: + id: "{{ result.snapshot_schedule_details.id }}" + + - name: Create snapshot schedule (Rule Type - every_n_hours) - Idempotency + dellemc.unity.snapshotschedule: + unispherehost: "{{ unispherehost }}" + validate_certs: "{{ validate_certs }}" + username: "{{ username }}" + password: "{{ password }}" + name: "Ansible_Every_N_Hours_Testing" + type: "every_n_hours" + interval: 6 + desired_retention: 24 + state: "{{ state_present }}" + + - name: Create snapshot schedule (Rule Type - every_day) + dellemc.unity.snapshotschedule: + unispherehost: "{{ unispherehost }}" + validate_certs: "{{ validate_certs }}" + username: "{{ username }}" + password: "{{ password }}" + name: "Ansible_Every_Day_Testing" + type: "every_day" + hours_of_day: + - 8 + - 14 + auto_delete: true + state: "{{ state_present }}" + + - name: Create snapshot schedule (Rule Type - every_n_days) + dellemc.unity.snapshotschedule: + unispherehost: "{{ unispherehost }}" + validate_certs: "{{ validate_certs }}" + username: "{{ username }}" + password: "{{ password }}" + name: "Ansible_Every_N_Day_Testing" + type: "every_n_days" + day_interval: 2 + desired_retention: 16 + retention_unit: "days" + state: "{{ state_present }}" + + - name: Create snapshot schedule (Rule Type - every_week) + dellemc.unity.snapshotschedule: + unispherehost: "{{ unispherehost }}" + validate_certs: "{{ validate_certs }}" + username: "{{ username }}" + password: "{{ password }}" + name: "Ansible_Every_Week_Testing" + type: "every_week" + days_of_week: + - MONDAY + - FRIDAY + hour: 12 + minute: 30 + desired_retention: 200 + state: "{{ state_present }}" + + - name: Create snapshot schedule (Rule Type - every_month) + dellemc.unity.snapshotschedule: + unispherehost: "{{ unispherehost }}" + validate_certs: "{{ validate_certs }}" + username: "{{ username }}" + password: "{{ password }}" + name: "Ansible_Every_Month_Testing" + type: "every_month" + day_of_month: 17 + auto_delete: true + state: "{{ state_present }}" + + - name: Get snapshot schedule details using name + dellemc.unity.snapshotschedule: + unispherehost: "{{ unispherehost }}" + validate_certs: "{{ validate_certs }}" + username: "{{ username }}" + password: "{{ password }}" + name: "Ansible_Every_N_Hours_Testing" + state: "{{ state_present }}" + + - name: Get snapshot schedule details using id + dellemc.unity.snapshotschedule: + unispherehost: "{{ unispherehost }}" + validate_certs: "{{ validate_certs }}" + username: "{{ username }}" + password: "{{ password }}" + id: "{{ id }}" + state: "{{ state_present }}" + + - name: Modify snapshot schedule details id + dellemc.unity.snapshotschedule: + unispherehost: "{{ unispherehost }}" + validate_certs: "{{ validate_certs }}" + username: "{{ username }}" + password: "{{ password }}" + id: "{{ id }}" + type: "every_n_hours" + interval: 8 + state: "{{ state_present }}" + + - name: Modify snapshot schedule details id - Idempotency + dellemc.unity.snapshotschedule: + unispherehost: "{{ unispherehost }}" + validate_certs: "{{ validate_certs }}" + username: "{{ username }}" + password: "{{ password }}" + id: "{{ id }}" + type: "every_n_hours" + interval: 8 + state: "{{ state_present }}" + + - name: Modify snapshot schedule using name + dellemc.unity.snapshotschedule: + unispherehost: "{{ unispherehost }}" + validate_certs: "{{ validate_certs }}" + username: "{{ username }}" + password: "{{ password }}" + name: "Ansible_Every_Day_Testing" + type: "every_day" + desired_retention: 200 + auto_delete: false + state: "{{ state_present }}" + + - name: Delete snapshot schedule using id + dellemc.unity.snapshotschedule: + unispherehost: "{{ unispherehost }}" + validate_certs: "{{ validate_certs }}" + username: "{{ username }}" + password: "{{ password }}" + id: "{{ id }}" + state: "{{ state_absent }}" + + - name: Delete snapshot schedule using name + dellemc.unity.snapshotschedule: + unispherehost: "{{ unispherehost }}" + validate_certs: "{{ validate_certs }}" + username: "{{ username }}" + password: "{{ password }}" + name: "Ansible_Every_Day_Testing" + state: "{{ state_absent }}" + + - name: Delete snapshot schedule using name + dellemc.unity.snapshotschedule: + unispherehost: "{{ unispherehost }}" + validate_certs: "{{ validate_certs }}" + username: "{{ username }}" + password: "{{ password }}" + name: "Ansible_Every_N_Day_Testing" + state: "{{ state_absent }}" + + - name: Delete snapshot schedule using name + dellemc.unity.snapshotschedule: + unispherehost: "{{ unispherehost }}" + validate_certs: "{{ validate_certs }}" + username: "{{ username }}" + password: "{{ password }}" + name: "Ansible_Every_Week_Testing" + state: "{{ state_absent }}" + + - name: Delete snapshot schedule using name + dellemc.unity.snapshotschedule: + unispherehost: "{{ unispherehost }}" + validate_certs: "{{ validate_certs }}" + username: "{{ username }}" + password: "{{ password }}" + name: "Ansible_Every_Month_Testing" + state: "{{ state_absent }}" + + - name: Delete snapshot schedule using name - Idempotency + dellemc.unity.snapshotschedule: + unispherehost: "{{ unispherehost }}" + validate_certs: "{{ validate_certs }}" + username: "{{ username }}" + password: "{{ password }}" + name: "Ansible_Every_Month_Testing" + state: "{{ state_absent }}" |