From e66186f89a78eeec311eba07aa0cc8165ba533ad Mon Sep 17 00:00:00 2001 From: Isaac Prior Date: Mon, 9 Nov 2020 14:31:03 +0000 Subject: [PATCH] Add service specific custom haproxy config override Change-Id: If6c50606fa3da353728ae4d916df20fcc95b8927 --- ansible/roles/haproxy-config/tasks/main.yml | 2 ++ ...upport-haproxy-service-override-85bcc4d3c0af6cf2.yaml | 9 +++++++++ 2 files changed, 11 insertions(+) create mode 100644 releasenotes/notes/support-haproxy-service-override-85bcc4d3c0af6cf2.yaml diff --git a/ansible/roles/haproxy-config/tasks/main.yml b/ansible/roles/haproxy-config/tasks/main.yml index 07caf04463..19920d463a 100644 --- a/ansible/roles/haproxy-config/tasks/main.yml +++ b/ansible/roles/haproxy-config/tasks/main.yml @@ -3,6 +3,8 @@ vars: service: "{{ item.value }}" haproxy_templates: + - "{{ node_custom_config }}/haproxy-config/{{ inventory_hostname }}/{{ item.key }}.cfg" + - "{{ node_custom_config }}/haproxy-config/{{ item.key }}.cfg" - "{{ node_custom_config }}/haproxy-config/{{ inventory_hostname }}/{{ haproxy_service_template }}" - "{{ node_custom_config }}/haproxy-config/{{ haproxy_service_template }}" - "templates/{{ haproxy_service_template }}" diff --git a/releasenotes/notes/support-haproxy-service-override-85bcc4d3c0af6cf2.yaml b/releasenotes/notes/support-haproxy-service-override-85bcc4d3c0af6cf2.yaml new file mode 100644 index 0000000000..0cf8de19e2 --- /dev/null +++ b/releasenotes/notes/support-haproxy-service-override-85bcc4d3c0af6cf2.yaml @@ -0,0 +1,9 @@ +--- +features: + - | + Adds a means of overriding the haproxy config of individual + services. Custom template files can be placed under + ``{{ node_custom_config }}/haproxy-config/`` to be rendered + with the same variables as the generic template. + Template file names must match the service to override eg. + ``nova-novncproxy.cfg``.