commit | author | age
|
6e5577
|
1 |
- name: Delete Infrastructure |
S |
2 |
hosts: localhost |
|
3 |
connection: local |
|
4 |
gather_facts: False |
|
5 |
become: no |
|
6 |
vars_files: |
|
7 |
- "./env_vars.yml" |
|
8 |
- "./env_secret_vars.yml" |
|
9 |
|
|
10 |
tasks: |
|
11 |
- name: Destroy cloudformation template |
|
12 |
cloudformation: |
|
13 |
stack_name: "{{project_tag}}" |
|
14 |
state: "absent" |
|
15 |
region: "{{aws_region}}" |
|
16 |
disable_rollback: false |
|
17 |
tags: |
|
18 |
Stack: "project {{env_type}}-{{ guid }}" |
|
19 |
tags: [ destroying, destroy_cf_deployment ] |
bb9f98
|
20 |
register: cloudformation_result |
GC |
21 |
until: cloudformation_result|succeeded |
|
22 |
retries: 5 |
|
23 |
delay: 60 |
|
24 |
ignore_errors: yes |
|
25 |
|
|
26 |
- name: report Cloudformation error |
|
27 |
fail: |
|
28 |
msg: "FAIL {{ project_tag }} Destroy Cloudformation" |
|
29 |
when: not cloudformation_result|succeeded |
0d5815
|
30 |
tags: [ destroying, destroy_cf_deployment ] |