scale_computing.hypercore.snapshot_schedule module – Manage snap schedule to configure the desired schedule of snapshot creation.
Note
This module is part of the scale_computing.hypercore collection (version 1.6.0).
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 scale_computing.hypercore
.
To use it in a playbook, specify: scale_computing.hypercore.snapshot_schedule
.
New in scale_computing.hypercore 1.0.0
Synopsis
Create and delete an automated VM snapshot schedule on HyperCore API endpoint
/rest/v1/VirDomainSnapshotSchedule
.
Parameters
Parameter |
Comments |
---|---|
Scale Computing HyperCore instance information. |
|
Select login method. If not set, the value of the Value local - username/password is verified by the HyperCore server (the local users). Value oidc - username/password is verified by the configured OIDC provider. Choices:
|
|
The HyperCore instance URL. If not set, the value of the For example “https://10.1.2.3:443”. |
|
Password used for authentication. If not set, the value of the |
|
Timeout in seconds for the connection with the Scale Computing HyperCore API instance. If not set, the value of the |
|
Username used for authentication. If not set, the value of the |
|
Snapshot schedule’s name. Serves as unique identifier across all snapshot schedules. |
|
The recurrence rules we want to set for the snapshot schedule. Default: |
|
The frequency of the recurrence. The value must comply with RFC-2445. A valid example is |
|
Retention time in seconds. |
|
The recurrence’s name. |
|
Remote retention time in seconds. If either not set or set to either |
|
The start of the snapshot schedule in the local timezone timestamp. |
|
The desired state of the snapshot schedule object. Use Choices:
|
Notes
Note
The
record
return value will be changed from list (containing a single item) to dict. There will be no release where both old and new variant work at the same time. The change will happen with release 3.0.0. To ease migration, the only change between last 1.x or 2.x release and 3.0.0 release will be changing therecord
return value. List of deprecation changes includes examples to help with transition.check_mode
is not supported.
See Also
See also
- scale_computing.hypercore.snapshot_schedule_info
Retrieve information about an automated VM snapshot schedule.
- scale_computing.hypercore.vm_replication
Handles VM replications.
Examples
- name: Setup snapshot schedule
scale_computing.hypercore.snapshot_schedule:
name: demo-snap-schedule
state: present
recurrences:
- name: weekly-tuesday
frequency: "FREQ=WEEKLY;INTERVAL=1;BYDAY=TU" # RFC-2445
start: "2010-01-01 00:00:00"
local_retention: "{{ 10 * 7*24*60*60 }}" # 10 days, unit seconds
remote_retention: # optional, None or 0 means same as local_retention.
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The created or deleted snapshot schedule from the HyperCore API endpoint Returned: success |
|
Human-readable snapshot schedule name Returned: success Sample: |
|
Snapshot scheduling rules Returned: success Sample: |
|
Unique identifier Returned: success Sample: |