Skip epel mirror if already setup

There is no need to configure epel, if already installed when
installing puppet.

Change-Id: Ideba593a78a8017c3855548377193887183818b0
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2018-07-23 20:18:59 -04:00 committed by Ian Wienand
parent 699ac759c5
commit cecfeb6591

View File

@ -135,6 +135,10 @@ function setup_puppet_fedora {
} }
function setup_puppet_rhel7 { function setup_puppet_rhel7 {
# NOTE(pabelanger): In openstack-infra, we already have epel on
# our nodes, properly configured for mirrors and gpg keys; thus
# check to see if the package is installed first.
if ! rpm -qa | grep -q epel-release; then
# install a bootstrap epel repo to install latest epel-release # install a bootstrap epel repo to install latest epel-release
# package (which provides correct gpg keys, etc); then remove # package (which provides correct gpg keys, etc); then remove
# boostrap # boostrap
@ -148,6 +152,7 @@ gpgcheck=0
EOF EOF
yum --enablerepo=epel-bootstrap -y install epel-release yum --enablerepo=epel-bootstrap -y install epel-release
rm -f /etc/yum.repos.d/epel-bootstrap.repo rm -f /etc/yum.repos.d/epel-bootstrap.repo
fi
_systemd_update _systemd_update
yum update -y yum update -y