From: Markos Chandras Date: Fri, 10 Aug 2018 10:24:00 +0000 (+0300) Subject: xci-lib: Allow more openSUSE IDs X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=fb1e2a6368f1f8e7e6a999ea714d76f97c38fb22;p=releng-xci.git xci-lib: Allow more openSUSE IDs Leap 15 is using ID=opensuse-leap and Tumbleweed is using ID=opensuse-tumbleweed so we should extend the regexp to match these distributions as well. This allows XCI to support more openSUSE variants as deployment hosts. Change-Id: I8bf8e7b15fc00c45807ff92fbc14d7ec79ec4bcb Signed-off-by: Markos Chandras --- diff --git a/xci/config/user-vars b/xci/config/user-vars index 1f30ec38..2625de24 100755 --- a/xci/config/user-vars +++ b/xci/config/user-vars @@ -21,7 +21,7 @@ # export XCI_FLAVOR="ha" #------------------------------------------------------------------------------- export XCI_FLAVOR=${XCI_FLAVOR:-mini} -export XCI_DISTRO=${XCI_DISTRO:-$(source /etc/os-release &>/dev/null || source /usr/lib/os-release &>/dev/null; echo ${ID,,})} +export XCI_DISTRO=${XCI_DISTRO:-$(source /etc/os-release &>/dev/null || source /usr/lib/os-release &>/dev/null; ID=${ID%%-*}; echo ${ID,,})} export XCI_CEPH_ENABLED=${XCI_CEPH_ENABLED:-false} #------------------------------------------------------------------------------- diff --git a/xci/files/xci-lib.sh b/xci/files/xci-lib.sh index 060dc267..064b9f68 100644 --- a/xci/files/xci-lib.sh +++ b/xci/files/xci-lib.sh @@ -55,7 +55,7 @@ function install_ansible() { source /etc/os-release || source /usr/lib/os-release case ${ID,,} in - *suse) + *suse*) OS_FAMILY="Suse" INSTALLER_CMD="sudo -H -E zypper -q install -y --no-recommends" CHECK_CMD="zypper search --match-exact --installed"