Skip to content

Instantly share code, notes, and snippets.

@damomurf
Created February 16, 2017 03:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save damomurf/41735fe138e2fe41a785fe2b2e839bf7 to your computer and use it in GitHub Desktop.
Save damomurf/41735fe138e2fe41a785fe2b2e839bf7 to your computer and use it in GitHub Desktop.
- name: Create Internal Haproxy ELB
ec2_elb_lb:
name: "{{ prefix }}-haproxy-lb"
state: present
region: "{{ region }}"
subnets: "{{ haproxy_subnet_ids }}"
scheme: internal
cross_az_load_balancing: yes
purge_subnets: yes
purge_zones: yes
health_check:
ping_protocol: http
ping_port: 9090
ping_path: "/_haproxy_health_check"
response_timeout: 5
interval: 10
unhealthy_threshold: 3
healthy_threshold: 5
listeners:
- protocol: http
load_balancer_port: 80
instance_protocol: http
instance_port: 80
security_group_names:
- "{{ prefix }}-masters"
- "{{ prefix }}-haproxy-internal-web"
tags:
Name: "{{ prefix }}-haproxy-lb"
"{{ aws_tags }}"
register: elb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment