Add autorestic.all file and move two services
This commit is contained in:
parent
aa9c76a622
commit
c28a195f49
4 changed files with 37 additions and 16 deletions
roles/backup/vars
|
@ -4,6 +4,7 @@ backup_svc:
|
|||
name: backup
|
||||
|
||||
backup_list: "{{ all_services | my_service_attributes(inventory_hostname, 'backup') }}"
|
||||
backup_list_all: "{{ all_services | my_service_attributes('', 'backup') }}"
|
||||
|
||||
backup_msg_start: "Backup started"
|
||||
backup_msg_fail: "Backup failed"
|
||||
|
@ -28,6 +29,20 @@ backup_default_hooks:
|
|||
- '{{ backup_hc_curl_base }} --data "{{ backup_msg_fail_location }}${AUTORESTIC_LOCATION}" {{ backup_hc_url }}/fail'
|
||||
- '{{ backup_gatus_curl_base }} "{{ backup_gatus_url }}?success=false&error={{ backup_msg_fail_location | urlencode }}${AUTORESTIC_LOCATION}'
|
||||
|
||||
backup_global:
|
||||
all:
|
||||
cache-dir: "{{ (service_path, 'cache') | path_join }}"
|
||||
retry-lock: 5m
|
||||
forget:
|
||||
keep-last: 7
|
||||
keep-daily: 14
|
||||
keep-weekly: 16
|
||||
keep-monthly: 12
|
||||
keep-yearly: 2
|
||||
host: "{{ ansible_facts.hostname }}"
|
||||
backup:
|
||||
host: "{{ ansible_facts.hostname }}"
|
||||
|
||||
backup_yml:
|
||||
version: 2
|
||||
|
||||
|
@ -35,16 +50,13 @@ backup_yml:
|
|||
|
||||
locations: "{{ backup_list | map_backup_locations(vault_backup.backends, backup_default_hooks ) }}"
|
||||
|
||||
global:
|
||||
all:
|
||||
cache-dir: "{{ (service_path, 'cache') | path_join }}"
|
||||
retry-lock: 5m
|
||||
forget:
|
||||
keep-last: 7
|
||||
keep-daily: 14
|
||||
keep-weekly: 16
|
||||
keep-monthly: 12
|
||||
keep-yearly: 2
|
||||
host: "{{ ansible_facts.hostname }}"
|
||||
backup:
|
||||
host: "{{ ansible_facts.hostname }}"
|
||||
global: "{{ backup_global }}"
|
||||
|
||||
backup_yml_all:
|
||||
version: 2
|
||||
|
||||
backends: "{{ vault_backup.backends }}"
|
||||
|
||||
locations: "{{ backup_list_all | map_backup_locations(vault_backup.backends, backup_default_hooks ) }}"
|
||||
|
||||
global: "{{ backup_global }}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue