-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathremove-autoscaling.yml
More file actions
69 lines (60 loc) · 1.91 KB
/
remove-autoscaling.yml
File metadata and controls
69 lines (60 loc) · 1.91 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
- hosts: localhost
connection: local
gather_facts: no
vars:
region: us-east-1
tasks:
- local_action:
module: ec2_elb_lb
region: "{{ region }}"
name: Auto-ELB
state: absent
zones:
- us-east-1a
- us-east-1b
- us-east-1c
- us-east-1d
- us-east-1e
- us-east-1f
listeners:
- protocol: http # options are http, https, ssl, tcp
load_balancer_port: 80
instance_port: 80
proxy_protocol: True
- protocol: https
load_balancer_port: 443
instance_protocol: http # optional, defaults to value of protocol setting
instance_port: 80
# ssl certificate required for https or ssl
ssl_certificate_id: arn:aws:acm:us-east-1:380486833044:certificate/bc2b55ba-a392-4208-883f-64fe24a37306
# ssl_certificate_id: "arn:aws:iam::123456789012:server-certificate/company/servercerts/ProdServerCert"
#
- name: remove autoscaling group
ec2_asg:
name: Ansible_Auto_Group
state: absent
load_balancers: [ 'Auto-ELB' ]
availability_zones: [ 'us-east-1a', 'us-east-1b' ]
vpc_zone_identifier: [ 'subnet-ecf80ca4', 'subnet-c6b5859d' ]
launch_config_name: Anisble_Launch_Config
health_check_period: 60
health_check_type: ELB
replace_all_instances: yes
min_size: 1
max_size: 3
desired_capacity: 2
region: "{{ region }}"
tags:
- environment: production
propagate_at_launch: no
- name: remove launch config
ec2_lc:
name: Anisble_Launch_Config
state: absent
image_id: ami-11dc0a6b
key_name: POC-TEST-KEY
region: "{{ region }}"
security_groups: sg-fe64b88c
instance_type: t2.micro
assign_public_ip: yes