aboutsummaryrefslogtreecommitdiff
path: root/tasks
diff options
context:
space:
mode:
authorJulien Dessaux2021-05-02 18:42:01 +0200
committerJulien Dessaux2021-05-02 18:42:01 +0200
commit5d9a22501476b3384451b98eeb6b1dee65fed21d (patch)
tree51bcbd1914beda62ea450fb14bba3ee13670e52a /tasks
parentFixed stupid ansible python sucks silent name collision (diff)
downloadborg-ansible-role-5d9a22501476b3384451b98eeb6b1dee65fed21d.tar.gz
borg-ansible-role-5d9a22501476b3384451b98eeb6b1dee65fed21d.tar.bz2
borg-ansible-role-5d9a22501476b3384451b98eeb6b1dee65fed21d.zip
Reworked and improved borg role
Diffstat (limited to '')
-rw-r--r--tasks/common.yml10
-rw-r--r--tasks/main.yml4
2 files changed, 3 insertions, 11 deletions
diff --git a/tasks/common.yml b/tasks/common.yml
index 057cd25..6e8ed55 100644
--- a/tasks/common.yml
+++ b/tasks/common.yml
@@ -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:
diff --git a/tasks/main.yml b/tasks/main.yml
index 3433cb8..daa0836 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -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