Ansible 2.4

This commit is contained in:
Luc Stroobant 2018-02-04 20:00:49 +01:00
parent eda258a262
commit 0d50034758
2 changed files with 7 additions and 5 deletions

View File

@ -4,6 +4,8 @@ The role supports both self hosted and offsite backup-storage such as rsync.net
It's possible to configure append-only repositories to secure the backups against deletion from the client.
Ansible 2.4 is required to run this role.
## Required variables
Define a group borgbackup\_servers in your inventory with one or multiple hosts. The group borgbackup\_management is only necessary if you want to enable append-only mode and prune the backups from a secured hosts.
```
@ -74,4 +76,4 @@ ansible-playbook -i inventory/test backup.yml -l client1.fiaas.co
```
## Further reading
https://borgbackup.readthedocs.io/en/stable/
* https://borgbackup.readthedocs.io/en/stable/

View File

@ -1,18 +1,18 @@
---
- include: install.yml
- include_tasks: install.yml
when: >
borgbackup_required == True or
inventory_hostname in groups.borgbackup_servers
- include: borg-server.yml
- include_tasks: borg-server.yml
when: inventory_hostname in groups.borgbackup_servers
- include: borg-client.yml
- include_tasks: borg-client.yml
when: >
borgbackup_required == True and
inventory_hostname not in groups.borgbackup_servers
- include: management.yml
- include_tasks: management.yml
when: >
inventory_hostname in groups.borgbackup_management and
inventory_hostname not in groups.borgbackup_servers