From 6a6d3ab34e6f0d0b8e5d153f0884bdf88a136fca Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Wed, 24 Jun 2015 18:04:34 +0000 Subject: [PATCH] Lets try and add a check here for haproxy. It won't catch non resolving names, but it will other errors. --- roles/haproxy/tasks/main.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/roles/haproxy/tasks/main.yml b/roles/haproxy/tasks/main.yml index e829c11e9a..a7c26197c0 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: