981d4f9072
* allow to installation via os package manager or pip * Run a second time to install via package manager * Check for EPEL if distro package requested. * Split dep lists to avoid installing build deps when using distro pkg Co-authored-by: Stefan Morgenthaler <dev@morgenthaler.at> Co-authored-by: Manu <manu@snapdragon.cc>
19 lines
574 B
YAML
19 lines
574 B
YAML
---
|
|
- name: Check if EPEL repo is enabled, if installation from distro is requested
|
|
when: ansible_os_family == 'RedHat'
|
|
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.
|
|
|
|
- name: Install borgmatic and borg via distribution package manager
|
|
package:
|
|
name: "{{ item }}"
|
|
state: present
|
|
loop: "{{ borg_distro_packages }}"
|