Skip to content

Commit 613b885

Browse files
klaphiapatard
authored andcommitted
Moving cleaning up molecule_instance_config tasks to the of the block, because this task changes the when condition of the block immediately and following tasks will be skipped regardless ot their when condition.
1 parent d511fe6 commit 613b885

File tree

1 file changed

+5
-5
lines changed
  • src/molecule_plugins/ec2/cookiecutter/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}

1 file changed

+5
-5
lines changed

src/molecule_plugins/ec2/cookiecutter/{{cookiecutter.molecule_directory}}/{{cookiecutter.scenario_name}}/destroy.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,6 @@
111111
until: ec2_instances is finished
112112
retries: 300
113113

114-
- name: Write Molecule instance configs
115-
ansible.builtin.copy:
116-
dest: "{{ molecule_instance_config }}"
117-
content: "{{ {} | to_yaml }}"
118-
119114
- name: Destroy ephemeral security groups (if needed)
120115
amazon.aws.ec2_security_group:
121116
profile: "{{ item.aws_profile | default(omit) }}"
@@ -142,4 +137,9 @@
142137
index_var: index
143138
label: "{{ item.name }}"
144139
when: item.key_inject_method == "ec2"
140+
141+
- name: Write Molecule instance configs
142+
ansible.builtin.copy:
143+
dest: "{{ molecule_instance_config }}"
144+
content: "{{ {} | to_yaml }}"
145145
{%- endraw %}

0 commit comments

Comments
 (0)