vmware.vmware.vcsa_backup_schedule module – Configure the vCenter Server Appliance backup schedule
Note
This module is part of the vmware.vmware collection (version 2.3.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 vmware.vmware
.
To use it in a playbook, specify: vmware.vmware.vcsa_backup_schedule
.
Synopsis
Configure the vCenter Server Appliance backup schedule.
Only one schedule per vCenter Server Appliance can exist.
Before taking a backup, a backup server must be set up and configured such that the vCenter server has access to it. The protocols supported for backup are FTPS, HTTPS, SFTP, FTP, NFS, SMB and HTTP.
Parameters
Parameter |
Comments |
---|---|
If true and If false, other properties are still checked for differences. If a difference is found, the value of If the password options are unset, this parameter is ignored. This option is needed because there is no way to check the current password value and compare it against the desired password value. Choices:
|
|
If true, the underlying Postgres DB/VCDB will use a fast backup method. Choices:
|
|
Whether or not the schedule should be enabled. Choices:
|
|
A password to use to encrypt the backup. If this is unset, the backup is not encrypted. |
|
The hostname or IP address of the vSphere vCenter server. If the value is not specified in the task, the value of environment variable |
|
If true, historical data about stats, events, and tasks will be included in the backups. Choices:
|
|
If true, the supervisors control plane will be included in the backups. Choices:
|
|
Options describing the location where the backup should be stored. |
|
The password to use to authenticate to the location URL, if one is required. |
|
The remote server where the backup should be sent. The vCenter server must be able to access this location. This should be a url in the format of protocol://server-address<:port-number>/folder/subfolder The protocols supported for backup are FTPS, HTTPS, SFTP, FTP, NFS, SMB and HTTP. |
|
The username to use to authenticate to the location URL, if one is required. |
|
The name of the backup schedule. This must be unique, and is used as an identifier for the schedule. Your VCSA may only allow for one schedule. If you create this schedule via the web UI, its name is ‘default’. You can change the name by deleting the existing schedule and creating a new one with a new name. Default: |
|
The password of the vSphere vCenter server. If the value is not specified in the task, the value of environment variable |
|
The port number of the vSphere vCenter server. If the value is not specified in the task, the value of environment variable Default: |
|
The address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable |
|
The port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable |
|
The proxy connection protocol to use. This option is used if the correct proxy protocol cannot be automatically determined. Choices:
|
|
The number of backups to retain. If this is set to 0, all backups are kept. Default: |
|
Options describing the timing and recurrence of the backup schedule. |
|
The days of the week that this backup should be run. At least one day should be selected. Options are MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY |
|
The hour of the day in 24-hour format that this backup should be run. |
|
The minute of the hour that this backup should be run. |
|
Whether the schedule should be present or absent. Choices:
|
|
The username of the vSphere vCenter server. If the value is not specified in the task, the value of environment variable |
|
Allows connection when SSL certificates are not valid. Set to If the value is not specified in the task, the value of environment variable Choices:
|
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full |
The check_mode support. |
Notes
Note
All modules require API write access and hence are not supported on a free ESXi license.
All variables and VMware object names are case sensitive.
Modules may rely on the ‘requests’ python library, which does not use the system certificate store by default. You can specify the certificate store by setting the REQUESTS_CA_BUNDLE environment variable. Note having this variable set may cause a ‘false’ value for the ‘validate_certs’ option to be ignored in some cases. Example: ‘export REQUESTS_CA_BUNDLE=/path/to/your/ca_bundle.pem’
Examples
- name: Configure The Default Schedule
vmware.vmware.vcsa_backup_schedule:
schedule:
hour: 23
minute: 59
days_of_week:
- saturday
location:
url: nfs://10.10.10.10:/nfs/iso_datastore/vcenterbackup/
username: root
retain_count: 3
- name: Remove The Default Schedule
vmware.vmware.vcsa_backup_schedule:
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Dictionary identifying the schedule that was modified Returned: always Sample: |
|
Identifying information about the appliance Returned: always Sample: |