2019-05-27 12:12:13 +02:00
|
|
|
---
|
2022-12-09 13:48:37 +01:00
|
|
|
- name: Check if EPEL repo is enabled, if installation from distro is requested
|
2022-12-15 13:24:26 +01:00
|
|
|
when: ansible_os_family == 'RedHat'
|
2022-12-09 13:48:37 +01:00
|
|
|
block:
|
|
|
|
- name: Get list of installed packages
|
|
|
|
ansible.builtin.package_facts:
|
|
|
|
manager: auto
|
|
|
|
- name: Ensure EPEL is enabled
|
|
|
|
ansible.builtin.assert:
|
|
|
|
that:
|
|
|
|
- "'epel-release' in ansible_facts.packages"
|
|
|
|
fail_msg: Need EPEL repo to install via distro package.
|
2022-12-15 13:24:26 +01:00
|
|
|
|
|
|
|
- name: Install borgmatic and borg via distribution package manager
|
|
|
|
package:
|
|
|
|
name: "{{ item }}"
|
|
|
|
state: present
|
|
|
|
loop: "{{ borg_distro_packages }}"
|