Add backupclient
This commit is contained in:
@@ -1,3 +1,21 @@
|
||||
---
|
||||
- name: install borg
|
||||
apt: name="borgbackup" state=present
|
||||
apt: 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}}"
|
||||
|
||||
2
roles/backup/templates/borg_README.j2
Normal file
2
roles/backup/templates/borg_README.j2
Normal file
@@ -0,0 +1,2 @@
|
||||
This is a generate FET borg repository.
|
||||
Name: {{item.name}}
|
||||
Reference in New Issue
Block a user