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:
parent
699ac759c5
commit
cecfeb6591
@ -135,10 +135,14 @@ function setup_puppet_fedora {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setup_puppet_rhel7 {
|
function setup_puppet_rhel7 {
|
||||||
# install a bootstrap epel repo to install latest epel-release
|
# NOTE(pabelanger): In openstack-infra, we already have epel on
|
||||||
# package (which provides correct gpg keys, etc); then remove
|
# our nodes, properly configured for mirrors and gpg keys; thus
|
||||||
# boostrap
|
# check to see if the package is installed first.
|
||||||
cat > /etc/yum.repos.d/epel-bootstrap.repo <<EOF
|
if ! rpm -qa | grep -q epel-release; then
|
||||||
|
# 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 <<EOF
|
||||||
[epel-bootstrap]
|
[epel-bootstrap]
|
||||||
name=Bootstrap EPEL
|
name=Bootstrap EPEL
|
||||||
mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=epel-7&arch=\$basearch
|
mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=epel-7&arch=\$basearch
|
||||||
@ -146,8 +150,9 @@ failovermethod=priority
|
|||||||
enabled=0
|
enabled=0
|
||||||
gpgcheck=0
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user