summaryrefslogtreecommitdiffstats
path: root/roles/haproxy/tasks/main.yml
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2015-11-12 10:42:39 -0500
committerKenny Woodson <kwoodson@redhat.com>2015-11-12 10:42:39 -0500
commit5ed42612965d72b87638ebe2fa96bec89199c4fa (patch)
treec58b76b1a9b42ee4adba2a07d5917e519fef9691 /roles/haproxy/tasks/main.yml
parent7869fb8c26a96c1e0ee74b930fd0da8a9952cb52 (diff)
parent597ba24415d6b7faa7ca02d200c8aed3c08b925a (diff)
downloadopenshift-5ed42612965d72b87638ebe2fa96bec89199c4fa.tar.gz
openshift-5ed42612965d72b87638ebe2fa96bec89199c4fa.tar.bz2
openshift-5ed42612965d72b87638ebe2fa96bec89199c4fa.tar.xz
openshift-5ed42612965d72b87638ebe2fa96bec89199c4fa.zip
Merge pull request #878 from openshift/master
Master to prod
Diffstat (limited to 'roles/haproxy/tasks/main.yml')
-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