Created
June 1, 2016 18:06
-
-
Save geowa4/574d38a3d40d45cb636bca38175c09cf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: create load balancer | |
ec2_elb_lb: | |
name: '{{ application }}-{{ item.name }}-elb' | |
region: '{{ region }}' | |
connection_draining_timeout: 60 | |
cross_az_load_balancing: yes | |
health_check: | |
ping_protocol: http | |
ping_port: 80 | |
ping_path: '{{ item.elb_ping_path|default("/") }}' | |
response_timeout: 5 | |
interval: 30 | |
unhealthy_threshold: 2 | |
healthy_threshold: 5 | |
idle_timeout: 60 | |
purge_listeners: yes | |
listeners: | |
- protocol: http | |
load_balancer_port: 80 | |
instance_port: 80 | |
- protocol: https | |
load_balancer_port: 443 | |
instance_protocol: http | |
instance_port: 80 | |
ssl_certificate_id: '{{ item.elb_cert_arn }}' | |
purge_subnets: yes | |
subnets: '{{ subnets.results|map(attribute="subnet")|map(attribute="id")|list }}' | |
security_group_ids: '{{ elb_internal_sg.group_id if item.internal_only|default(False) else elb_sg.group_id }}' | |
state: present | |
with_items: '{{ asg_stack.elbs|default([]) }}' | |
register: elbs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment