Skip to content

Commit

Permalink
Add install_scl_repo: true for RHEL 7.
Browse files Browse the repository at this point in the history
Install Software Collections (SCL) repository.

Package: postgresql12-devel-12.3-1PGDG.rhel7.x86_64 (pgdg12) Requires: llvm-toolset-7-clang
But the dependencies doesn't exist on standart repo.

https://redmine.postgresql.org/issues/5528
https://people.planetpostgresql.org/devrim/index.php?/archives/104-yum-users-some-devel-RPMs-require-a-new-repository.html
  • Loading branch information
vitabaks committed May 18, 2020
1 parent 22a5531 commit cc24028
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
30 changes: 30 additions & 0 deletions roles/add-repository/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,36 @@
when: install_epel_repo|bool
tags: install_epel_repo

# Install SCL Repository
- name: Install Software Collections (SCL) repository for CentOS 7
package:
name: centos-release-scl-rh
state: present
when: install_scl_repo|bool and
(ansible_distribution == 'CentOS' and
ansible_distribution_major_version == '7')
tags: install_scl_repo

- name: Install Software Collections (SCL) repository for OracleLinux 7
yum_repository:
name: ol7_software_collections
description: Software Collection Library packages for Oracle Linux 7 (x86_64)
baseurl: https://yum.oracle.com/repo/OracleLinux/OL7/SoftwareCollections/x86_64/
gpgkey: file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck: true
enabled: true
when: install_scl_repo|bool and
(ansible_distribution == "OracleLinux" and
ansible_distribution_major_version == '7')
tags: install_scl_repo

- name: Enable Software Collections (SCL) repository for RedHat 7
command: 'sudo yum-config-manager --enable rhel-server-rhscl-7-rpms'
when: install_scl_repo|bool and
(ansible_distribution == 'Red Hat Enterprise Linux' and
ansible_distribution_major_version == '7')
tags: install_scl_repo

# Install PostgreSQL Repository
- name: Get pgdg-redhat-repo-latest.noarch.rpm
get_url:
Expand Down
1 change: 1 addition & 0 deletions vars/RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ yum_repository: []

install_epel_repo: true # or 'false' (installed from the package "epel-release-latest.noarch.rpm")
install_postgresql_repo: true # or 'false' (installed from the package "pgdg-redhat-repo-latest.noarch.rpm")
install_scl_repo: true # or 'false' (Redhat 7 family only)

# Packages (for yum repo)
os_specific_packages:
Expand Down

0 comments on commit cc24028

Please sign in to comment.