aboutsummaryrefslogtreecommitdiff
path: root/tasks/common.yml
blob: 057cd252771f5e9fc4b7e36a7c047a5d51155342 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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
...