Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for multiple force_persist options and for use_server options #109

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
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
10 changes: 9 additions & 1 deletion templates/backend.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,13 @@
{% endif -%}

{% if item.force_persist is defined -%}
force-persist {{ item.force_persist }}
{%- for force_persist in item.force_persist -%}
force-persist {{ force_persist }}
{% endfor -%}
{% endif -%}

{% if item.use_server is defined -%}
{%- for use_server in item.use_server -%}
use-server {{ use_server }}
{% endfor -%}
{% endif -%}
10 changes: 9 additions & 1 deletion templates/frontend.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,13 @@ frontend {{ item.name }} {%if item.ip is defined %}{{ item.ip }}{% endif %}{%if
{% endif -%}

{% if item.force_persist is defined -%}
force-persist {{ item.force_persist }}
{%- for force_persist in item.force_persist -%}
force-persist {{ force_persist }}
{% endfor -%}
{% endif -%}

{% if item.use_server is defined -%}
{%- for use_server in item.use_server -%}
use-server {{ use_server }}
{% endfor -%}
{% endif -%}
9 changes: 8 additions & 1 deletion templates/listen.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,12 @@ listen {{ item.name }}
{% endif -%}
{% endif %}
{% if item.force_persist is defined -%}
force-persist {{ item.force_persist }}
{%- for force_persist in item.force_persist -%}
force-persist {{ force_persist }}
{% endfor -%}
{% endif -%}
{% if item.use_server is defined -%}
{%- for use_server in item.use_server -%}
use-server {{ use_server }}
{% endfor -%}
{% endif -%}
3 changes: 3 additions & 0 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ empty: true
# rspirep:
# - "^Location:\ 127.0.0.1:8080 Location:\ www.mydomain.com"
# force_persist:
# - if hdr(Host) serverX
# use_server:
# - server if hdr(Host) serverX
#
#haproxy_backends:
# - name:
Expand Down