From 19ed74d63816fffa8e581ccc50f6a528819e8a45 Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Mon, 12 Sep 2016 18:36:33 +0200 Subject: [PATCH] Allow a custom haproxy configuration file TrivialFix Change-Id: I5ebb8bc42fa9483adfb397ba1856c750a3b70a7b --- ansible/roles/haproxy/tasks/config.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ansible/roles/haproxy/tasks/config.yml b/ansible/roles/haproxy/tasks/config.yml index 50d3246718..1ec4245d38 100644 --- a/ansible/roles/haproxy/tasks/config.yml +++ b/ansible/roles/haproxy/tasks/config.yml @@ -25,10 +25,12 @@ - name: Copying over haproxy.cfg template: - src: "{{ item }}.cfg.j2" - dest: "{{ node_config_directory }}/{{ item }}/{{ item }}.cfg" - with_items: - - "haproxy" + src: "{{ item }}" + dest: "{{ node_config_directory }}/haproxy/haproxy.cfg" + with_first_found: + - "{{ node_custom_config }}/haproxy/{{ inventory_hostname }}/haproxy.cfg" + - "{{ node_custom_config }}/haproxy/haproxy.cfg" + - "haproxy.cfg.j2" - name: Copying over keepalived.conf template: