Skip to content

Commit

Permalink
tests/autoscaling_lifecycle_hook: bump the instance image
Browse files Browse the repository at this point in the history
`amzn2-ami-hvm-2.0.20190612-x86_64-gp2` is not available anymore, we
replace it with `amzn2-ami-hvm-2.0.20220805.0-x86_64-gp2`.
  • Loading branch information
goneri committed Sep 14, 2022
1 parent 4ab9744 commit cc9cf55
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# defaults file for ec2_asg
# Amazon Linux 2 AMI 2019.06.12 (HVM), GP2 Volume Type
ec2_ami_name: 'amzn2-ami-hvm-2.0.20190612-x86_64-gp2'
ec2_ami_name: 'amzn2-ami-hvm-2.0.20220805.0-x86_64-gp2'
load_balancer_name: "{{ tiny_prefix }}-lb"
ec2_asg_setup_run_once: true
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
block:

# ============================================================

- name: Find AMI to use
ec2_ami_info:
owners: 'amazon'
filters:
name: '{{ ec2_ami_name }}'
register: ec2_amis
until: ec2_amis.images|length>0
retries: 3
- debug: var=ec2_amis
- set_fact:
ec2_ami_image: '{{ ec2_amis.images[0].image_id }}'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
# defaults file for ec2_asg_lifecycle_hook
# Amazon Linux 2 AMI 2019.06.12 (HVM), GP2 Volume Type
ec2_ami_name: 'amzn2-ami-hvm-2.0.20190612-x86_64-gp2'
ec2_ami_name: 'amzn2-ami-hvm-2.0.20220805.0-x86_64-gp2'
load_balancer_name: "{{ tiny_prefix }}-lb"
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
filters:
name: '{{ ec2_ami_name }}'
register: ec2_amis
until: ec2_amis.images|length>0
retries: 3
- set_fact:
ec2_ami_image: '{{ ec2_amis.images[0].image_id }}'

Expand Down

0 comments on commit cc9cf55

Please sign in to comment.