From 04bf13111ebe27c3a173668fc1903b59d5937c7a Mon Sep 17 00:00:00 2001 From: Joseph Mulloy Date: Tue, 22 Aug 2023 12:44:38 -0400 Subject: [PATCH] fix: Default to Ubuntu 20.04 Focal, remove xenial --- tubular/scripts/retrieve_latest_base_ami.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/tubular/scripts/retrieve_latest_base_ami.py b/tubular/scripts/retrieve_latest_base_ami.py index 0ab45caa..07fe88a3 100755 --- a/tubular/scripts/retrieve_latest_base_ami.py +++ b/tubular/scripts/retrieve_latest_base_ami.py @@ -71,18 +71,15 @@ def retrieve_latest_base_ami(environment, deployment, play, override, ubuntu_ver else: url = "" click.secho('Ubuntu version requested: {}'.format(ubuntu_version), fg='green') - if ubuntu_version == "16.04": - url = "https://cloud-images.ubuntu.com/query/xenial/server/released.current.txt" - click.secho('Xenial.\n: {}'.format(url), fg='green') + if ubuntu_version == "20.04": + url = "https://cloud-images.ubuntu.com/query/focal/server/released.current.txt" + click.secho('Focal.\n: {}'.format(url), fg='green') elif ubuntu_version == "18.04": url = "https://cloud-images.ubuntu.com/query/bionic/server/released.current.txt" click.secho('Bionic.\n: {}'.format(url), fg='green') - elif ubuntu_version == "20.04": - url = "https://cloud-images.ubuntu.com/query/focal/server/released.current.txt" - click.secho('Focal.\n: {}'.format(url), fg='green') if url == "": - url = "https://cloud-images.ubuntu.com/query/xenial/server/released.current.txt" - click.secho('Using default xenial images.\n: {}'.format(url), fg='red') + url = "https://cloud-images.ubuntu.com/query/focal/server/released.current.txt" + click.secho('Using default focal images.\n: {}'.format(url), fg='red') data = requests.get(url) parse_ami = re.findall('ebs-ssd(.+?)amd64(.+?){}(.+?)hvm'.format(region), data.content.decode('utf-8')) ami_id = parse_ami[0][2].strip()