opentelekomcloud / opentelekomcloud.cloud / 0.14.2 / module / cbr_policy Manage CBR Policy | "added in version" 0.12.4 of opentelekomcloud.cloud" Authors: Gubina Polina (@Polina-Gubina)opentelekomcloud.cloud.cbr_policy (0.14.2) — module
Install with ansible-galaxy collection install opentelekomcloud.cloud:==0.14.2
collections: - name: opentelekomcloud.cloud version: 0.14.2
Manage CBR policy resource from the OTC.
- name: Create policy opentelekomcloud.cloud.cbr_policy: name: "newpolicy" count_day_backups: 0 count_month_backups: 0 retention_duration_days: 5 count_year_backups: 0 pattern: - "FREQ=WEEKLY;BYHOUR=14;BYDAY=MO,TU,WE,TH,FR,SA,SU;BYMINUTE=00"
- name: Update policy opentelekomcloud.cloud.cbr_policy: name: "newpolicy" count_day_backups: 5 is_enabled: False
- name: Delete policy opentelekomcloud.cloud.cbr_policy: name: "newpolicy" state: absent
auth: description: - Dictionary containing auth information as needed by the cloud's auth plugin strategy. For the default I(password) plugin, this would contain I(auth_url), I(username), I(password), I(project_name) and any information about domains (for example, I(os_user_domain_name) or I(os_project_domain_name)) if the cloud supports them. For other plugins, this param will need to contain whatever parameters that auth plugin requires. This parameter is not needed if a named cloud is provided or OpenStack OS_* environment variables are present. type: dict name: description: Specifies the policy name or id. required: true type: str wait: default: true description: - Should ansible wait until the requested resource is complete. type: bool cloud: description: - Named cloud or cloud config to operate against. If I(cloud) is a string, it references a named cloud config as defined in an OpenStack clouds.yaml file. Provides default values for I(auth) and I(auth_type). This parameter is not needed if I(auth) is provided or if OpenStack OS_* environment variables are present. If I(cloud) is a dict, it contains a complete cloud configuration like would be in a section of clouds.yaml. type: raw state: choices: - present - absent default: present description: - Whether resource should be present or absent. type: str ca_cert: aliases: - cacert description: - A path to a CA Cert bundle that can be used as part of verifying SSL API requests. type: str pattern: description: - Scheduling rule. A maximum of 24 rules can be configured. The scheduling rule complies with iCalendar RFC 2445, but it supports only parameters FREQ, BYDAY, BYHOUR, BYMINUTE, and INTERVAL. FREQ can be set only to WEEKLY or DAILY. BYDAY can be set to MO, TU, WE, TH, FR, SA, and SU (seven days of a week). BYHOUR ranges from 0 to 23 hours. BYMINUTE ranges from 0 minutes to 59 minutes. The scheduling interval must not be less than 1 hour. A maximum of 24 time points are allowed in a day. For example - if the scheduling time is 14:00 from Monday to Sunday, set the scheduling rule to 'FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR,SA,SU;BYHOUR=14;BYMINUTE=00' - If the scheduling time is 14:00 every day, set the scheduling rule to 'FREQ=DAILY;INTERVAL=1;BYHOUR=14;BYMINUTE=00' - If the scheduling time is 14:00 every day, set the scheduling rule to 'FREQ=DAILY;INTERVAL=1;BYHOUR=14;BYMINUTE=00' - For update pattern all rules must be in the same order as existing policy has. elements: str type: list timeout: default: 180 description: - How long should ansible wait for the requested resource. type: int timezone: description: - Time zone where the user is located, for example, UTC+08:00. Set this parameter only after you have configured any of the parameters day_backups, week_backups, month_backups, year_backups. type: str auth_type: description: - Name of the auth plugin to use. If the cloud uses something other than password authentication, the name of the plugin should be indicated here and the contents of the I(auth) parameter should be updated accordingly. type: str interface: aliases: - endpoint_type choices: - admin - internal - public default: public description: - Endpoint URL type to fetch from the service catalog. type: str client_key: aliases: - key description: - A path to a client key to use as part of the SSL transaction. type: str is_enabled: description: Whether to enable the policy. By default 'true'. type: bool api_timeout: description: - How long should the socket layer wait before timing out for API calls. If this is omitted, nothing will be passed to the requests library. type: int client_cert: aliases: - cert description: - A path to a client certificate to use as part of the SSL transaction. type: str region_name: description: - Name of the region. type: str sdk_log_path: description: - Path to the logfile of the OpenStackSDK. If empty no log is written type: str sdk_log_level: choices: - ERROR - WARN - INFO - DEBUG default: WARN description: Log level of the OpenStackSDK type: str operation_type: description: - Protection type of the policy, 'backup' by default. - For now, value 'backup' is only possible. type: str validate_certs: aliases: - verify description: - Whether or not SSL API requests should be verified. - Before Ansible 2.3 this defaulted to C(yes). type: bool count_day_backups: description: - Specifies the number of retained daily backups. This parameter can be effective together with the maximum number of retained backups specified by max_backups. - If this parameter is configured, timezone is mandatory. type: int count_max_backups: description: - Maximum number of retained backups. - If the value is set to -1, the backups will not be cleared even though the configured retained backup quantity is exceeded. If this parameter and retention_duration_days are both left blank, the backups will be retained permanently. By default -1. type: int count_week_backups: description: - Specifies the number of retained weekly backups. The latest backup of each week is saved in the long term. This parameter can be effective together with the maximum number of retained backups specified by max_backups. The value ranges from 0 to 100. If this parameter is configured, timezone is mandatory. type: int count_year_backups: description: - Specifies the number of retained yearly backups. The latest backup of each year is saved in the long term. This parameter can be effective together with the maximum number of retained backups specified by max_backups. The value ranges from 0 to 100. If this parameter is configured, timezone is mandatory. type: int count_month_backups: description: - Specifies the number of retained monthly backups. The latest backup of each month is saved in the long term. This parameter can be effective together with the maximum number of retained backups specified by max_backups. - If this parameter is configured, timezone is mandatory. type: int retention_duration_days: description: - ID of the target disk to be restored. This parameter is mandatory for disk restoration. By default -1. type: int
policy: contains: associated_vaults: contains: destination_vault_id: description: - ID of the associated remote vault. type: str vault_id: description: - Vault ID. type: str description: Associated vault. type: list enabled: description: Whether the policy is enabled. type: bool id: description: Policy ID. type: str name: description: Policy name. type: str operation_definition: contains: day_backups: description: - Specifies the number of retained daily backups. type: int max_backups: description: - Maximum number of retained backups. type: int month_backups: description: - Specifies the number of retained monthly backups. type: int retention_duration_days: description: - Duration of retaining a backup, in days. type: int timezone: description: - Time zone where the user is located. type: str week_backups: description: - Specifies the number of retained weekly backups. type: int year_backups: description: - Specifies the number of retained yearly backups. type: str description: Policy attributes. type: complex operation_type: description: Backup id. type: str trigger: contains: id: description: Scheduler ID. type: str name: description: Scheduler name. type: str properties: contains: pattern: description: Scheduling policy of the scheduler. type: list start_time: description: Start time of the scheduler. type: str description: Scheduler attributes. type: complex type: description: - Scheduler type. Currently, only time (periodic scheduling) is supported. type: str description: Time scheduling rule for the policy. type: complex description: CBR policy object. returned: On Success. type: complex