From 5b953c8dba0d7d4be10f93dfa10da975e5be1294 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Tue, 9 Jul 2019 11:45:03 +0200 Subject: Added borg backup role --- tasks/common.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tasks/common.yml (limited to 'tasks/common.yml') diff --git a/tasks/common.yml b/tasks/common.yml new file mode 100644 index 0000000..057cd25 --- /dev/null +++ b/tasks/common.yml @@ -0,0 +1,25 @@ +--- +- 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: Push borg gathering fact on client + copy: + src: borg.fact + dest: /etc/ansible/facts.d/ + mode: 0500 + owner: root + register: borg_gathering_fact + +- name: reload ansible_local + setup: filter=ansible_local + when: borg_gathering_fact.changed +... -- cgit v1.2.3