From 25a8ff1a2305513204eb36019777a218d24a2783 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Fri, 9 Jan 2015 09:54:58 +1100 Subject: [PATCH] Always install latest EPEL Use a little trick we deployed in devstack to install the latest epel-release rpm; first setup a disabled "bootstrap" repo to epel and then yum install the latest package. This should avoid us having to touch anything when EPEL decides to create a new release. Change-Id: I9e43de3770b6dff03fd87edbf5decbae9780d8db --- install_puppet.sh | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/install_puppet.sh b/install_puppet.sh index 646aa19826..94bdda5775 100755 --- a/install_puppet.sh +++ b/install_puppet.sh @@ -83,11 +83,21 @@ function setup_puppet_fedora { function setup_puppet_rhel7 { - local epel_pkg="http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-2.noarch.rpm" local puppet_pkg="https://yum.puppetlabs.com/el/7/products/x86_64/puppetlabs-release-7-10.noarch.rpm" - # install EPEL - rpm -qi epel-release &> /dev/null || rpm -Uvh $epel_pkg + # install a bootstrap epel repo to install latest epel-release + # package (which provides correct gpg keys, etc); then remove + # boostrap + cat > /etc/yum.repos.d/epel-bootstrap.repo < /dev/null || rpm -Uvh $epel_pkg - # NOTE: for RHEL (not CentOS) enable the optional-rpms channel (if - # not already enabled) - # yum-config-manager --enable rhel-6-server-optional-rpms + # install a bootstrap epel repo to install latest epel-release + # package (which provides correct gpg keys, etc); then remove + # boostrap + cat > /etc/yum.repos.d/epel-bootstrap.repo <