Skip to content

Commit 78fcf28

Browse files
authored
Merge pull request #185 from mmetz-isa/add-opt-params
Add various optional parameters
2 parents d0d7073 + 0019bce commit 78fcf28

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

templates/keepalived-checks.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
{% if rserver.tcp_checks is defined %}
33
{% for tcp_check in rserver.tcp_checks %}
44
TCP_CHECK {
5+
{% if tcp_check.connect_port is defined and tcp_check.connect_port %}
56
connect_port {{ tcp_check.connect_port }}
7+
{% endif %}
68
connect_timeout {{ tcp_check.connect_timeout | default('5') }}
79
{% if tcp_check.connect_ip is defined and tcp_check.connect_ip %}
810
connect_ip {{ tcp_check.connect_ip }}

templates/keepalived-virtual-server.j2

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
{# extra spaces are needed for backward compatibility #}
2-
ip_family {{ vserver.ip_family | default('inet') }}
2+
{% if vserver.ip_family is defined %}
3+
ip_family {{ vserver.ip_family | default('inet', true) }}
4+
{% endif %}
35
{% if vserver.delay_loop is defined %}
46
delay_loop {{ vserver.delay_loop }}
57
{% endif %}
68
lvs_sched {{ vserver.lvs_sched | default ('rr') }}
79
lvs_method {{ vserver.lvs_method | default ('DR') }}
10+
{% if vserver.persistence_timeout is defined %}
11+
persistence_timeout {{ vserver.persistence_timeout }}
12+
{% endif %}
813
protocol {{ vserver.protocol | default ('TCP') }}
914
{% if vserver.ha_suspend is defined and vserver.ha_suspend %}
1015
ha_suspend

0 commit comments

Comments
 (0)