summaryrefslogtreecommitdiffstats
path: root/roles/haproxy/tasks
diff options
context:
space:
mode:
authorJason DeTiberus <jdetiber@redhat.com>2015-08-21 23:49:49 -0400
committerAndrew Butcher <abutcher@redhat.com>2015-11-04 19:57:21 -0500
commit3778662ef816b2bb0a3788ed65229b45622a0139 (patch)
treea64dec3e317a55d87d86a5262ca2b598f625c9de /roles/haproxy/tasks
parent399b19864653806c769ac954a6c79ef13a895d64 (diff)
downloadopenshift-3778662ef816b2bb0a3788ed65229b45622a0139.tar.gz
openshift-3778662ef816b2bb0a3788ed65229b45622a0139.tar.bz2
openshift-3778662ef816b2bb0a3788ed65229b45622a0139.tar.xz
openshift-3778662ef816b2bb0a3788ed65229b45622a0139.zip
Start of true master ha
Diffstat (limited to 'roles/haproxy/tasks')
-rw-r--r--roles/haproxy/tasks/main.yml25
1 files changed, 25 insertions, 0 deletions
diff --git a/roles/haproxy/tasks/main.yml b/roles/haproxy/tasks/main.yml
new file mode 100644
index 000000000..5638b7313
--- /dev/null
+++ b/roles/haproxy/tasks/main.yml
@@ -0,0 +1,25 @@
+---
+- name: Install haproxy
+ yum:
+ pkg: haproxy
+ state: present
+
+- name: Configure haproxy
+ template:
+ src: haproxy.cfg.j2
+ dest: /etc/haproxy/haproxy.cfg
+ owner: root
+ group: root
+ mode: 0644
+ notify: restart haproxy
+
+- name: Enable and start haproxy
+ service:
+ name: haproxy
+ state: started
+ enabled: yes
+ register: start_result
+
+- name: Pause 30 seconds if haproxy was just started
+ pause: seconds=30
+ when: start_result | changed