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

added timeout settings for listen, frontend and backend #29

Merged
merged 1 commit into from
May 18, 2016
Merged
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
5 changes: 5 additions & 0 deletions templates/backend.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,8 @@ backend {{ item.name }}
option {{ option }}
{% endfor %}
{% endif -%}
{% if item.timeout is defined -%}
{% for entry in item.timeout %}
timeout {{ entry.param }} {{ entry.value }}
{% endfor %}
{% endif -%}
6 changes: 6 additions & 0 deletions templates/frontend.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ frontend {{ item.name }} {%if item.ip is defined %}{{ item.ip }}{% endif %}{%if
maxconn {{ item.maxconn }}
{% endif -%}

{% if item.timeout is defined -%}
{% for entry in item.timeout %}
timeout {{ entry.param }} {{ entry.value }}
{% endfor %}
{% endif -%}

{%- if item.monitor is defined -%}
{% if item.monitor.uri is defined -%}
monitor-uri {{ item.monitor.uri }}
Expand Down
6 changes: 5 additions & 1 deletion templates/listen.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,8 @@ listen {{ item.name }}
option {{ option }}
{% endfor %}
{% endif -%}

{% if item.timeout is defined -%}
{% for entry in item.timeout %}
timeout {{ entry.param }} {{ entry.value }}
{% endfor %}
{% endif -%}
11 changes: 11 additions & 0 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ empty: true
# use_backend:
# - name:
# condition:
# timeout:
# - param:
# value:
#
#haproxy_backends:
# - name:
Expand All @@ -86,6 +89,8 @@ empty: true
# log:
# retries:
# contimeout:
# NOTE: contimeout is deprecated
# http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#4-contimeout
# http-send-name-header:
# http-check-expect:
# - condition
Expand All @@ -101,6 +106,9 @@ empty: true
# - param1
# options:
# - forwardfor
# timeout:
# - param:
# value:
#
#haproxy_listen:
# - name:
Expand Down Expand Up @@ -128,3 +136,6 @@ empty: true
# - param1
# options:
# - forwardfor
# timeout:
# - param:
# value: