Files
ansible-fet/roles/backup/tasks/borg.yml
2018-03-16 18:07:05 +01:00

22 lines
494 B
YAML

---
- name: install borg
package: name="borgbackup" state=present
- name: create repositories
file:
path: "{{item.path}}"
state: directory
with_items: "{{backup.repositories}}"
- name: init borg repositories
command: "borg init {{item.path}} --encryption=none"
args:
creates: "{{item.path}}/README"
with_items: "{{backup.repositories}}"
- name: create READMES
template:
src=borg_README.j2
dest="{{item.path}}/README"
with_items: "{{backup.repositories}}"