summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Fenzi <kevin@scrye.com>2015-06-24 18:04:34 +0000
committerRalph Bean <rbean@redhat.com>2015-06-24 19:59:42 +0000
commit6a6d3ab34e6f0d0b8e5d153f0884bdf88a136fca (patch)
tree6764189c62801298134e93b8e87dd86c6a431dc0
parent23b737c37e254b313139d2ec82e21256641d43d5 (diff)
downloadansible-6a6d3ab34e6f0d0b8e5d153f0884bdf88a136fca.tar.gz
ansible-6a6d3ab34e6f0d0b8e5d153f0884bdf88a136fca.tar.xz
ansible-6a6d3ab34e6f0d0b8e5d153f0884bdf88a136fca.zip
Lets try and add a check here for haproxy. It won't catch non resolving names, but it will other errors.
-rw-r--r--roles/haproxy/tasks/main.yml8
1 files changed, 8 insertions, 0 deletions
diff --git a/roles/haproxy/tasks/main.yml b/roles/haproxy/tasks/main.yml
index e829c11e9..a7c26197c 100644
--- a/roles/haproxy/tasks/main.yml
+++ b/roles/haproxy/tasks/main.yml
@@ -41,6 +41,14 @@
tags:
- haproxy
+- name: check haproxy cfg to make sure it is valid (prod)
+ command: haproxy -c -f /etc/haproxy/haproxy.cfg
+ always_run: true
+ register: haproxyconfigcheck
+ changed_when: haproxyconfigcheck.rc != 0
+ tags:
+ - haproxy
+
- name: Make sure haproxy is awake and reporting for duty
service: name=haproxy state=started enabled=yes
tags: