1
0
mirror of synced 2024-11-26 14:56:08 +03:00

Update AWS template

- Filter AMIs using official Ubuntu and Debian AWS account IDs
- Change Debian AMI names back to using wildcards
- Closes: #841
This commit is contained in:
hwdsl2 2020-08-27 22:47:46 -05:00
parent 220954470d
commit a0e0a6ba54

View File

@ -584,10 +584,10 @@
" elif distribution == 'Ubuntu20.04':", " elif distribution == 'Ubuntu20.04':",
" IAMName = 'ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*'", " IAMName = 'ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*'",
" elif distribution == 'Debian9':", " elif distribution == 'Debian9':",
" IAMName = 'debian-stretch-hvm-x86_64-gp2-2020-07-20-58035'", " IAMName = 'debian-stretch-hvm-x86_64-gp2-*'",
" elif distribution == 'Debian10':", " elif distribution == 'Debian10':",
" IAMName = 'debian-10-amd64-20200803-347'", " IAMName = 'debian-10-amd64-*'",
" response = ec2.describe_images(Filters=[{'Name':'name', 'Values':[IAMName]}])", " response = ec2.describe_images(Filters=[{'Name':'name', 'Values':[IAMName]}], Owners=['099720109477', '136693071363', '379101102735'])",
" images = response['Images']", " images = response['Images']",
" images.sort(key=creation_date,reverse=True)", " images.sort(key=creation_date,reverse=True)",
" AMIId = images[0]['ImageId']", " AMIId = images[0]['ImageId']",