e5a2e07301
instack runs this script on a system where epel has already been installed, which causes the yum command to fail. Only installing the epel-release rpm when it isn't already present addresses the issue. Change-Id: Ia179d7c7ed69ea5f785b5dcd16394c7663a145cc
10 lines
375 B
Bash
Executable File
10 lines
375 B
Bash
Executable File
#!/bin/bash
|
|
set -eu
|
|
set -o pipefail
|
|
|
|
if [[ "rhel7 centos7" =~ "$DISTRO_NAME" ]]; then
|
|
rpm -q epel-release || yum install -y http://download.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-2.noarch.rpm
|
|
elif [[ "rhel" =~ "$DISTRO_NAME" ]]; then
|
|
rpm -q epel-release || yum install -y http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
|
|
fi
|