32 lines
861 B
YAML
32 lines
861 B
YAML
---
|
|
|
|
- name: copy key
|
|
template:
|
|
src: borg_ssh_key.j2
|
|
dest: /root/borg_ssh_key
|
|
owner: root
|
|
group: root
|
|
mode: 0600
|
|
|
|
- name: push borg
|
|
import_role:
|
|
name: borgbase.ansible_role_borgbackup
|
|
vars:
|
|
borg_encryption_passphrase: "{{ borg_password }}"
|
|
borg_repository: "{{ borg_repo }}"
|
|
borg_user: "{{ borg_my_user }}"
|
|
borg_group: "{{ borg_my_group }}"
|
|
borgmatic_timer: cron
|
|
borg_ssh_command: "ssh -o StrictHostKeyChecking=no -i {{ borg_ssh_key }}"
|
|
borgmatic_relocated_repo_access_is_ok: true
|
|
borg_source_directories:
|
|
"{{ base_files + (extra_files[inventory_hostname] | default([])) }}"
|
|
borg_retention_policy:
|
|
keep_hourly: 3
|
|
keep_daily: 7
|
|
keep_weekly: 4
|
|
keep_monthly: 6
|
|
borgmatic_hooks:
|
|
after_backup:
|
|
- "curl -d '{{ inventory_hostname }}' {{ backup_topic }}"
|