Reworked and improved borg role
This commit is contained in:
parent
2451b5ced3
commit
5d9a225014
11 changed files with 123 additions and 57 deletions
|
@ -1,15 +1,7 @@
|
|||
---
|
||||
- name: set distro-specific server variables
|
||||
include_vars: '{{ ansible_os_family }}.yml'
|
||||
|
||||
- name: Check if borg is supported on distro
|
||||
fail:
|
||||
msg: "borg tasks are not supported on this operating system yet."
|
||||
when: borg_packages is not defined
|
||||
|
||||
- name: Ensure borg is installed
|
||||
package:
|
||||
name: "{{ borg_packages }}"
|
||||
name: "{{ borg.package_name }}"
|
||||
|
||||
- name: Push borg gathering fact on client
|
||||
copy:
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
- action: borg_init
|
||||
|
||||
- import_tasks: common.yml
|
||||
when: borg.is_server or borg_server is defined
|
||||
when: borg.server.clients != [] or borg_server is defined
|
||||
|
||||
- import_tasks: server.yml
|
||||
when: borg.is_server
|
||||
when: borg.server.clients != []
|
||||
|
||||
- import_tasks: client.yml
|
||||
when: borg_server is defined
|
||||
|
|
Reference in a new issue