-
Notifications
You must be signed in to change notification settings - Fork 0
/
playbook.yml
29 lines (28 loc) · 1.01 KB
/
playbook.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
- name: Creating the Stack
hosts: localhost
gather_facts: false
roles:
- { role: 01-ssh_key, when: just_delete | bool == false }
- { role: 02-security_groups, when: just_delete | bool == false }
- { role: 03-ec2, when: just_delete | bool == false }
- { role: 04-launch_configuration, when: just_delete | bool == false }
- { role: 05-target_group, when: just_delete | bool == false }
- { role: 06-load_balancer, when: just_delete | bool == false }
- { role: 07-auto_scaling, when: just_delete | bool == false }
tasks:
- include_role:
name: get_all_instances
- name: Deleting environment
hosts: localhost
gather_facts: false
roles:
- { role: delete, when: just_delete | bool == true or (
delete_env|bool == true
or delete_asg|bool == true
or delete_tg|bool == true
or delete_lb|bool == true
or delete_ec2|bool == true
or delete_lc|bool == true
or delete_sg|bool == true
or delete_key|bool == true
) }