Updated from OpenStack Ansible Tests

Change-Id: I92cb56200a7c20244d13775b10b1d552f55200e6
This commit is contained in:
OpenStack Proposal Bot 2017-08-03 15:27:07 +00:00
parent 3a0f3ec810
commit c2fd4a5c1d
1 changed files with 4 additions and 1 deletions

View File

@ -35,9 +35,12 @@ source /etc/os-release || source /usr/lib/os-release
install_pkg_deps() {
pkg_deps="git"
# Prefer dnf over yum for CentOS.
which dnf &>/dev/null && RHT_PKG_MGR='dnf' || RHT_PKG_MGR='yum'
case ${ID,,} in
*suse*) pkg_mgr_cmd="zypper -n in" ;;
centos|rhel) pkg_mgr_cmd="yum install -y" ;;
centos|rhel) pkg_mgr_cmd="${RHT_PKG_MGR} install -y" ;;
fedora) pkg_mgr_cmd="dnf -y install" ;;
ubuntu|debian) pkg_mgr_cmd="apt-get install -y" ;;
*) echo "unsupported distribution: ${ID,,}"; exit 1 ;;