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:
parent
220954470d
commit
a0e0a6ba54
@ -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']",
|
||||||
|
Loading…
Reference in New Issue
Block a user