Skip to content

Commit

Permalink
Minor fix: run setup only once
Browse files Browse the repository at this point in the history
  • Loading branch information
mandar242 committed Apr 13, 2022
1 parent 13efc34 commit ee5869e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- ec2_asg - fixed bugfix to make test setup run once (https://github.com/ansible-collections/community.aws/pull/1061).
4 changes: 0 additions & 4 deletions tests/integration/targets/ec2_asg/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
aws_secret_key: "{{ aws_secret_key }}"
security_token: "{{ security_token | default(omit) }}"
region: "{{ aws_region }}"
vars:
# We can't just use "run_once" because the facts don't propagate when
# running an 'include' that was run_once
setup_run_once: yes
block:
- include_role:
name: 'ec2_asg'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
# Amazon Linux 2 AMI 2019.06.12 (HVM), GP2 Volume Type
ec2_ami_name: 'amzn2-ami-hvm-2.0.20190612-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
@@ -1,9 +1,8 @@
- name: Run ec2_asg integration tests.

run_once: '{{ ec2_asg_setup_run_once }}'
block:

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

- name: Find AMI to use
ec2_ami_info:
owners: 'amazon'
Expand Down

0 comments on commit ee5869e

Please sign in to comment.