Add support for custom HAProxy service config

Allow users to create/override HAProxy service configuration by
copying over '*.cfg' files from {{ node_custom_config
}}/haproxy/services.d/

Ex: /etc/kolla/config/haproxy/services.d/radosgw.cfg

Change-Id: Id84e3b6e62e544582d6917047534e846e026798d
Signed-off-by: Keith Plant <kplantjr@gmail.com>
This commit is contained in:
Keith Plant 2019-11-11 12:52:56 -05:00
parent 8a003189ef
commit a3a1b068fe
2 changed files with 21 additions and 0 deletions

View File

@ -67,6 +67,22 @@
notify:
- Restart haproxy container
- name: Copying over custom haproxy services configuration
vars:
service: "{{ haproxy_services['haproxy'] }}"
copy:
src: "{{ item }}"
dest: "{{ node_config_directory }}/haproxy/services.d/"
mode: "0660"
become: true
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
with_fileglob:
- "{{ node_custom_config }}/haproxy/services.d/*.cfg"
notify:
- Restart haproxy container
- name: Load and persist keepalived module
import_role:
role: module-load

View File

@ -0,0 +1,5 @@
---
features:
- |
HAProxy - Add the ability to define custom HAProxy services in
{{ node_custom_config }}/haproxy/services.d/