|
@@ -17,13 +17,19 @@
|
|
|
msg: "{{ asgs }}"
|
|
|
verbosity: 1
|
|
|
|
|
|
-- name: save launch config and scale group names
|
|
|
- set_fact:
|
|
|
- l_delete_sg_launch_config_name: "{{ asgs.results[0].launch_config_name }}"
|
|
|
- l_delete_sg_name: "{{ asgs.results[0].auto_scaling_group_name }}"
|
|
|
+# if re-running deprovisioning, the scale group/launch config may have already
|
|
|
+# been removed
|
|
|
+- name: delete launch configs and scale groups
|
|
|
+ when: asgs.results|length == 1
|
|
|
+ block:
|
|
|
|
|
|
-- when: openshift_aws_create_scale_group
|
|
|
- include_tasks: uninstall_scale_group.yml
|
|
|
+ - name: save launch config and scale group names
|
|
|
+ set_fact:
|
|
|
+ l_delete_sg_launch_config_name: "{{ asgs.results[0].launch_config_name }}"
|
|
|
+ l_delete_sg_name: "{{ asgs.results[0].auto_scaling_group_name }}"
|
|
|
|
|
|
-- when: openshift_aws_create_launch_config
|
|
|
- include_tasks: uninstall_launch_config.yml
|
|
|
+ - when: openshift_aws_create_scale_group
|
|
|
+ include_tasks: uninstall_scale_group.yml
|
|
|
+
|
|
|
+ - when: openshift_aws_create_launch_config
|
|
|
+ include_tasks: uninstall_launch_config.yml
|