Browse Source

Updated from OpenStack Ansible Tests

Change-Id: I92cb56200a7c20244d13775b10b1d552f55200e6
tags/17.0.0.0b1
OpenStack Proposal Bot 1 year ago
parent
commit
c2fd4a5c1d
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      run_tests.sh

+ 4
- 1
run_tests.sh View File

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

Loading…
Cancel
Save