Merge "Simplify version check"

This commit is contained in:
Zuul 2020-07-22 13:14:17 +00:00 committed by Gerrit Code Review
commit b4f980b23f

View File

@ -77,19 +77,8 @@ case ${DISTRO_ID} in
$(if [[ ${VERSION_ID} == '7' ]]; then echo "python-virtualenv"; else echo "python3-virtualenv"; fi)
;;
ubuntu|debian)
# NOTE(jrosser) remove this once infra debian images point to the upstream security repo
if `/bin/grep -q "stretch" /etc/os-release` && [ -f "/etc/apt/sources.list.d/security.list" ]; then
echo "deb http://security.debian.org stretch/updates main contrib" > /etc/apt/sources.list.d/security.list
fi
# NOTE(jrosser) remove this once infra debian repos are fixed for buster
if `/bin/grep -q "buster" /etc/os-release` && [ -f "/etc/apt/sources.list.d/security.list" ]; then
echo "deb http://deb.debian.org/debian buster main" > /etc/apt/sources.list.d/default.list
echo "deb http://deb.debian.org/debian buster-backports" main > /etc/apt/sources.list.d/backports.list
echo "deb http://security.debian.org buster/updates main contrib" > /etc/apt/sources.list.d/security.list
echo "deb http://deb.debian.org/debian buster-updates main" > /etc/apt/sources.list.d/updates.list
fi
# NOTE(mgariepy) remove this on ansible 2.10 if debian is in the config/base.yml file
if `/bin/grep -q "buster" /etc/os-release`; then
if [[ ${VERSION_ID} == "10" ]]; then
OSA_ANSIBLE_PYTHON_INTERPRETER="/usr/bin/python3"
fi
apt-get update