Skip to content

Instantly share code, notes, and snippets.

@Mattvogel
Created June 10, 2019 03:44
Show Gist options
  • Save Mattvogel/13ec8547df127f5ab9cb2872edfb7bf1 to your computer and use it in GitHub Desktop.
Save Mattvogel/13ec8547df127f5ab9cb2872edfb7bf1 to your computer and use it in GitHub Desktop.
---
- name: Ensure EPEL is installed
yum: name=epel-release state=latest
- name: Install HAProxy
yum: name=haproxy state=latest
- name: Ensure haproxy is stopped
service: name=haproxy state=stopped
- name: Configure HAproxy
template: >
src="haproxy.j2"
dest=/etc/haproxy/haproxy.cfg
- name: Start HAProxy
service: name=haproxy state=restarted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment