-
Notifications
You must be signed in to change notification settings - Fork 497
/
destroy.yml
48 lines (43 loc) · 1.33 KB
/
destroy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
################################################################################
################################################################################
############ Step 006 Destroy Workshop using workshop_prefix
################################################################################
################################################################################
- name: Step 0000 Set Action
hosts: localhost
connection: local
gather_facts: false
tags:
- must
- step0000
- setup_runtime
become: false
tasks:
- name: Set ACTION to destroy
when: ACTION is undefined
set_fact:
ACTION: destroy
- import_playbook: setup_runtime.yml
- name: Step 0000 Detect in what region the stack is
hosts: localhost
connection: local
gather_facts: False
become: no
tasks:
- when:
- cloud_provider == 'ec2'
- target_regions is not defined
include_tasks: cloud_providers/ec2_detect_region_tasks.yml
- import_playbook: >-
{{ lookup('first_found', {
'files': [ 'destroy_env.yml',
cloud_provider + '_destroy_env.yml'
],
'paths': [ 'configs/' + env_type,
'cloud_providers/'
]
})
}}
- import_playbook: save_output_dir.yml
- import_playbook: completion_callback.yml