From 8150ec4546348f6beccb49161d9891c1c5feb159 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Wed, 17 Jun 2020 17:01:51 +0300 Subject: [PATCH] Simplify version check Since we're already sourcing os-release with determine_distro function, there's no need in grepping it again. We also drop stretch block as this distro is not supported anymore. And we suppose that infra mirrors have been fixed, so dropping that part as well Change-Id: Ia08b2ab5de0dbea3c472412bd1efc9b4c955be7e --- scripts/bootstrap-ansible.sh | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/scripts/bootstrap-ansible.sh b/scripts/bootstrap-ansible.sh index cfc5b95968..ca8aee2434 100755 --- a/scripts/bootstrap-ansible.sh +++ b/scripts/bootstrap-ansible.sh @@ -77,19 +77,8 @@ case ${DISTRO_ID} in libselinux-python python-virtualenv ;; 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