Skip to content

Commit

Permalink
Merge pull request #185 from mmetz-isa/add-opt-params
Browse files Browse the repository at this point in the history
Add various optional parameters
  • Loading branch information
evrardjp authored Oct 11, 2021
2 parents d0d7073 + 0019bce commit 78fcf28
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions templates/keepalived-checks.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
{% if rserver.tcp_checks is defined %}
{% for tcp_check in rserver.tcp_checks %}
TCP_CHECK {
{% if tcp_check.connect_port is defined and tcp_check.connect_port %}
connect_port {{ tcp_check.connect_port }}
{% endif %}
connect_timeout {{ tcp_check.connect_timeout | default('5') }}
{% if tcp_check.connect_ip is defined and tcp_check.connect_ip %}
connect_ip {{ tcp_check.connect_ip }}
Expand Down
7 changes: 6 additions & 1 deletion templates/keepalived-virtual-server.j2
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
{# extra spaces are needed for backward compatibility #}
ip_family {{ vserver.ip_family | default('inet') }}
{% if vserver.ip_family is defined %}
ip_family {{ vserver.ip_family | default('inet', true) }}
{% endif %}
{% if vserver.delay_loop is defined %}
delay_loop {{ vserver.delay_loop }}
{% endif %}
lvs_sched {{ vserver.lvs_sched | default ('rr') }}
lvs_method {{ vserver.lvs_method | default ('DR') }}
{% if vserver.persistence_timeout is defined %}
persistence_timeout {{ vserver.persistence_timeout }}
{% endif %}
protocol {{ vserver.protocol | default ('TCP') }}
{% if vserver.ha_suspend is defined and vserver.ha_suspend %}
ha_suspend
Expand Down

0 comments on commit 78fcf28

Please sign in to comment.