Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions haproxy/templates/haproxy.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,19 @@ defaults
errorfile {{ errorfile_name }} {{ errorfile }}
{%- endfor %}
{% endif %}

{%- for cache_name, cache_options in salt['pillar.get']('haproxy:caches', {}) | dictsort %}
cache {{ cache_name }}
{%- for key, value in cache_options | dictsort %}
{%- if value is sameas true %}
{%- set value = 'on' %}
{%- elif value is sameas false %}
{%- set value = 'off' %}
{%- endif %}
{{ key }} {{ value }}
{%- endfor %}
{%- endfor %}

{%- if salt['pillar.get']('haproxy:resolvers') %}


Expand Down
5 changes: 5 additions & 0 deletions pillar.example
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ haproxy:
john: insecure-password doe
sam: insecure-password frodo

caches:
myapp-static:
max-age: 86400
process-vary: true

defaults:
log: global
mode: http
Expand Down
Loading