diff --git a/tasks/common-RHEL.yml b/tasks/common-RHEL.yml new file mode 100644 index 00000000..e748ea76 --- /dev/null +++ b/tasks/common-RHEL.yml @@ -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" diff --git a/tasks/main.yml b/tasks/main.yml index 701e91ec..836a32bf 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -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 }}"