diff --git a/ansible/roles/haproxy/tasks/config.yml b/ansible/roles/haproxy/tasks/config.yml index fb276fedfb86afe5729bb4d1886504ee437f2a84..10bdb77cdf55fbcf9a70d4be2bcce6b6e2bb2dc5 100644 --- a/ansible/roles/haproxy/tasks/config.yml +++ b/ansible/roles/haproxy/tasks/config.yml @@ -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 diff --git a/releasenotes/notes/haproxy-custom-services-c6bc343d162a8990.yaml b/releasenotes/notes/haproxy-custom-services-c6bc343d162a8990.yaml new file mode 100644 index 0000000000000000000000000000000000000000..43b284a32a3690e521416e7dc1130cfcb7080211 --- /dev/null +++ b/releasenotes/notes/haproxy-custom-services-c6bc343d162a8990.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + HAProxy - Add the ability to define custom HAProxy services in + {{ node_custom_config }}/haproxy/services.d/