22 lines
494 B
YAML
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}}"
|