Skip to content

Commit

Permalink
Add epel-release and extra repos for RHEL
Browse files Browse the repository at this point in the history
RHEL doesn't include the `epel-release` package on its official repositories,
so it is needed to install the `epel-release`rpm package from the fedoraproject
homepage.

It is recommended to also enable the optional and extras repositories since
EPEL packages may depend on packages from these repositories.
  • Loading branch information
mamedin committed Sep 12, 2018
1 parent 5698070 commit d6c86a5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tasks/common-RHEL.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---

#
# Install epel-release rpm package
#

- name: "Install EPEL repository on RHEL"
yum:
name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
state: "present"

#
# Install optional and extras repoisitories because EPEL packages may depend on
# packages from these repositories.
# See: https://github.com/artefactual-labs/ansible-archivematica-src/issues/209
#

- name: "Add rhel-*-optional-rpms repo on RHEL"
command: subscription-manager repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms"
4 changes: 4 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@
is_prod: "{{ archivematica_src_environment_type == 'production' }}"
tags: "always" # inocuous to use always here

- name: "Include common-RHEL.yml for RHEL"
include: "common-RHEL.yml"
when: "ansible_distribution == 'RedHat'"

- name: "Install necessary packages required by this role"
package:
name: "{{ item }}"
Expand Down

0 comments on commit d6c86a5

Please sign in to comment.