Skip to content

Commit

Permalink
add program section
Browse files Browse the repository at this point in the history
Signed-off-by: David Wahlstrom <[email protected]>
  • Loading branch information
David Wahlstrom committed Sep 28, 2021
1 parent 0b4a4dd commit 9b4d562
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions templates/etc/haproxy/haproxy.cfg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ defaults

{% include 'resolvers.cfg.j2' %}

{% include 'program.cfg.j2' %}

{% include 'listen.cfg.j2' %}

{% include 'cache.cfg.j2' %}
Expand Down
14 changes: 14 additions & 0 deletions templates/etc/haproxy/program.cfg.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{% if haproxy_program is defined %}
{% for program in haproxy_program %}
program {{ program.name }}
{% if program.command is defined %}
command {{ program.command }}
{% endif %}
{% for option in program.option | default([]) %}
option {{ option }}
{% endfor %}
{% for option in program.no_option | default([]) %}
no option {{ option }}
{% endfor %}
{% endfor %}
{% endif %}

0 comments on commit 9b4d562

Please sign in to comment.