infra/roles/borg/tasks/main.yml

30 lines
870 B
YAML
Raw Normal View History

2024-04-27 23:41:11 -04:00
- name: copy key
template:
src: ../templates/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 }}"
borg_source_directories:
"{{ base_files + (extra_files[inventory_hostname] | default([])) }}"
2024-07-02 00:55:09 -04:00
borgmatic_relocated_repo_access_is_ok: True
2024-04-27 23:41:11 -04:00
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 }}"