initial commit

This commit is contained in:
ace
2023-02-08 01:36:25 +03:00
commit 1aeb3158b5
10 changed files with 381 additions and 0 deletions

67
templates/haproxy.cfg.j2 Normal file
View File

@ -0,0 +1,67 @@
{% set haproxy_config = haproxy_combined_config %}
global
{% for key, value in haproxy_config.global.items() %}
{% if value | type_debug != 'list' %}
{{ key }} {{ value }}
{% else %}
{% for list_value in value %}
{{ key }} {{ list_value }}
{% endfor %}
{% endif %}
{% endfor %}
defaults
{% for key, value in haproxy_config.defaults.items() %}
{% if value | type_debug != 'list' %}
{{ key }} {{ value }}
{% else %}
{% for list_value in value %}
{{ key }} {{ list_value }}
{% endfor %}
{% endif %}
{% endfor %}
{% if haproxy_config.frontend is defined %}
{% for frontend in haproxy_config.frontend %}
frontend {{ frontend }}
{% for key, value in haproxy_config.frontend[frontend].items() %}
{% if value | type_debug != 'list' %}
{{ key }} {{ value }}
{% else %}
{% for list_value in value %}
{{ key }} {{ list_value }}
{% endfor %}
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
{% if haproxy_config.backend is defined %}
{% for backend in haproxy_config.backend %}
backend {{ backend }}
{% for key, value in haproxy_config.backend[backend].items() %}
{% if value | type_debug != 'list' %}
{{ key }} {{ value }}
{% else %}
{% for list_value in value %}
{{ key }} {{ list_value }}
{% endfor %}
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}
{% if haproxy_config.listen is defined %}
{% for listen in haproxy_config.listen %}
listen {{ listen }}
{% for key, value in haproxy_config.listen[listen].items() %}
{% if value | type_debug != 'list' %}
{{ key }} {{ value }}
{% else %}
{% for list_value in value %}
{{ key }} {{ list_value }}
{% endfor %}
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}