2022-03-04 14:24:09 +00:00
|
|
|
---
|
|
|
|
- name: Converge
|
|
|
|
hosts: all
|
|
|
|
become: yes
|
2022-03-08 13:42:14 +00:00
|
|
|
vars:
|
|
|
|
- borg_source_directories:
|
|
|
|
- /media/test1/
|
|
|
|
- /media/test2/
|
|
|
|
- borg_repository:
|
|
|
|
- /backup/
|
|
|
|
- borgmatic_config_name: config.yaml
|
|
|
|
|
2022-03-04 14:24:09 +00:00
|
|
|
pre_tasks:
|
2022-03-08 13:42:14 +00:00
|
|
|
#- name: Update apt cache
|
|
|
|
# apt:
|
|
|
|
# update_cache: yes
|
|
|
|
|
|
|
|
- name: Create sources directories
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
|
|
|
with_items: "{{ borg_source_directories + borg_repository}}"
|
2022-03-04 14:24:09 +00:00
|
|
|
|
|
|
|
tasks:
|
|
|
|
- name: "Include borgmatic"
|
|
|
|
include_role:
|
|
|
|
name: "borgmatic"
|