Skip to content

Commit

Permalink
Check for EPEL if distro package requested.
Browse files Browse the repository at this point in the history
  • Loading branch information
m3nu committed Dec 9, 2022
1 parent 1a6e6cc commit ed5db22
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
7 changes: 0 additions & 7 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,6 @@
hostname: database1.example.org
port: 5433

- role: m3nu.ansible_role_borgbackup
borg_encryption_passphrase: CHANGEME
borg_repository: [email protected]:repo
borg_source_directories:
- /srv/www
borgmatic_install_method: package-manager

post_tasks:
- name: Install yamllint for checking config file
pip:
Expand Down
11 changes: 11 additions & 0 deletions tasks/RedHat.yml
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit ed5db22

Please sign in to comment.