Created
June 2, 2016 00:42
-
-
Save geowa4/c9068db7aead11203a2f85ad7675c842 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 | |
until: elbs|success | |
retries: 5 | |
delay: 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment