dellemc.unity.snapshotschedule module – Manage snapshot schedules on Unity storage system
Note
This module is part of the dellemc.unity collection (version 1.6.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.unity
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: dellemc.unity.snapshotschedule
.
New in dellemc.unity 1.1.0
Synopsis
Managing snapshot schedules on Unity storage system includes creating new snapshot schedule, getting details of snapshot schedule, modifying attributes of snapshot schedule, and deleting snapshot schedule.
Requirements
The below requirements are needed on the host that executes this module.
A Dell Unity Storage device version 5.1 or later.
Ansible-core 2.12 or later.
Python 3.9, 3.10 or 3.11.
Storops Python SDK 1.2.11.
Parameters
Parameter |
Comments |
---|---|
Indicates whether the system can automatically delete the snapshot. Choices:
|
|
Number of days between snapshots. Applicable only when rule type is |
|
Day of the month for which the snapshot schedule rule applies. Applicable only when rule type is Value should be [1, 31]. |
|
Days of the week for which the snapshot schedule rule applies. Applicable only when rule type is Choices:
|
|
The number of days/hours for which snapshot will be retained. When auto_delete is Maximum desired retention supported is 31 days or 744 hours. |
|
The hour when the snapshot will be taken. Applicable for For create operation, if hour parameter is not specified, value will be taken as Value should be [0, 23]. |
|
Hours of the day when the snapshot will be taken. Applicable only when rule type is |
|
The ID of the snapshot schedule. |
|
Number of hours between snapshots. Applicable only when rule type is |
|
Minute offset from the hour when the snapshot will be taken. Applicable for all rule types. For a create operation, if minute parameter is not specified, value will be taken as Value should be [0, 59]. |
|
The name of the snapshot schedule. Name is mandatory for a create operation. Specify either name or id (but not both) for any operation. |
|
The password of the Unity management server. |
|
Port number through which communication happens with Unity management server. Default: |
|
The retention unit for the snapshot. Choices:
|
|
Define whether the snapshot schedule should exist or not. Choices:
|
|
Type of the rule to be included in snapshot schedule. Type is mandatory for any create or modify operation. Once the snapshot schedule is created with one type it can be modified. Choices:
|
|
IP or FQDN of the Unity management server. |
|
The username of the Unity management server. |
|
Boolean variable to specify whether or not to validate SSL certificate.
Choices:
|
Notes
Note
Snapshot schedule created through Ansible will have only one rule.
Modification of rule type is not allowed. Within the same type, other parameters can be modified.
If an existing snapshot schedule has more than 1 rule in it, only get and delete operation is allowed.
The check_mode is not supported.
The modules present in this collection named as ‘dellemc.unity’ are built to support the Dell Unity storage platform.
Examples
- name: Create snapshot schedule (Rule Type - every_n_hours)
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 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}}"
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 snapshot schedule. Returned: When snapshot schedule exists Sample: |
|
The system ID given to the snapshot schedule. Returned: success |
|
Details of volumes for which snapshot schedule applied. Returned: success |
|
List of volumes for which snapshot schedule applied. Returned: success |
|
Detail of volume. Returned: success |
|
The system ID given to volume. Returned: success |
|
The name of the snapshot schedule. Returned: success |
|
Details of rules that apply to snapshot schedule. Returned: success |
|
Days of the month for which the snapshot schedule rule applies. Returned: success |
|
Days of the week for which the snapshot schedule rule applies. Returned: success |
|
Enumeration of days of the week. Returned: success |
|
Hourly frequency for the snapshot schedule rule. Returned: success |
|
The system ID of the rule. Returned: success |
|
Number of days or hours between snaps, depending on the rule type. Returned: success |
|
Indicates whether the system can automatically delete the snapshot based on pool automatic-deletion thresholds. Returned: success |
|
Minute frequency for the snapshot schedule rule. Returned: success |
|
Period of time in seconds for which to keep the snapshot. Returned: success |
|
Period of time in hours for which to keep the snapshot. Returned: success |
|
Type of the rule applied to snapshot schedule. Returned: success |
|
Details of storage resources for which snapshot. schedule applied. Returned: success |
|
List of storage resources for which snapshot schedule applied. Returned: success |
|
Detail of storage resource. Returned: success |
|
The system ID given to storage resource. Returned: success |