Check for EPEL if distro package requested.

This commit is contained in:
Manu 2022-12-09 13:48:37 +01:00
parent 1a6e6cc7b1
commit ed5db2212f
2 changed files with 11 additions and 7 deletions

View File

@ -39,13 +39,6 @@
hostname: database1.example.org
port: 5433
- role: m3nu.ansible_role_borgbackup
borg_encryption_passphrase: CHANGEME
borg_repository: m5vz9gp4@m5vz9gp4.repo.borgbase.com:repo
borg_source_directories:
- /srv/www
borgmatic_install_method: package-manager
post_tasks:
- name: Install yamllint for checking config file
pip:

View File

@ -1 +1,12 @@
---
- name: Check if EPEL repo is enabled, if installation from distro is requested
when: borgmatic_install_method == 'package-manager'
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.