Skip to content

Instantly share code, notes, and snippets.

@kafecho
Created November 27, 2015 08:47
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 kafecho/2cb2270edf099816221b to your computer and use it in GitHub Desktop.
Save kafecho/2cb2270edf099816221b to your computer and use it in GitHub Desktop.
---
- name: install HAProxy
shell: yum install -y haproxy --disablerepo=* --enablerepo=ansible
- name: customize HAProxy to serve HTTP traffic to the designated downstream servers
template: src=haproxy.cfg.j2 dest=/etc/haproxy/haproxy.cfg owner=haproxy group=haproxy
notify: restart_haproxy
- name: ensure HAProxy is started and enabled at boot time
service: name=haproxy state=started enabled=yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment