summaryrefslogtreecommitdiff
path: root/data/templates/vrrp/keepalived.conf.tmpl
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-11-28 08:25:39 +0100
committerChristian Poessinger <christian@poessinger.com>2020-11-28 08:25:39 +0100
commitc87ad948999c28c3c9449f98d60b545481ea29d5 (patch)
tree18b188cf73266be95c62f128afe5d155a7a03bf4 /data/templates/vrrp/keepalived.conf.tmpl
parent41f79409c742b6a020318b196cbaa52439845d6d (diff)
downloadvyos-1x-c87ad948999c28c3c9449f98d60b545481ea29d5.tar.gz
vyos-1x-c87ad948999c28c3c9449f98d60b545481ea29d5.zip
vyos.template: T2720: fix remaining in-line time_block syntax
Commit a2ac9fac ("vyos.template: T2720: always enable Jinja2 trim_blocks feature") globally enabled the trim_blocks feature. Some templates still used in-line trim_blocks "{%"- or "-%}" which caused miss-placed line endings. This is fixed by removing all in-line trim_block statememnts of Jinja2 templates.
Diffstat (limited to 'data/templates/vrrp/keepalived.conf.tmpl')
-rw-r--r--data/templates/vrrp/keepalived.conf.tmpl68
1 files changed, 34 insertions, 34 deletions
diff --git a/data/templates/vrrp/keepalived.conf.tmpl b/data/templates/vrrp/keepalived.conf.tmpl
index 210621681..d51522e45 100644
--- a/data/templates/vrrp/keepalived.conf.tmpl
+++ b/data/templates/vrrp/keepalived.conf.tmpl
@@ -9,9 +9,9 @@ global_defs {
notify_fifo_script /usr/libexec/vyos/system/keepalived-fifo.py
}
-{% for group in groups -%}
+{% for group in groups %}
-{% if group.health_check_script -%}
+{% if group.health_check_script %}
vrrp_script healthcheck_{{ group.name }} {
script "{{ group.health_check_script }}"
interval {{ group.health_check_interval }}
@@ -22,9 +22,9 @@ vrrp_script healthcheck_{{ group.name }} {
{% endif %}
vrrp_instance {{ group.name }} {
- {% if group.description -%}
+ {% if group.description %}
# {{ group.description }}
- {% endif -%}
+ {% endif %}
state BACKUP
interface {{ group.interface }}
@@ -32,74 +32,74 @@ vrrp_instance {{ group.name }} {
priority {{ group.priority }}
advert_int {{ group.advertise_interval }}
- {% if group.preempt -%}
+ {% if group.preempt %}
preempt_delay {{ group.preempt_delay }}
- {% else -%}
+ {% else %}
nopreempt
- {% endif -%}
+ {% endif %}
- {% if group.peer_address -%}
+ {% if group.peer_address %}
unicast_peer { {{ group.peer_address }} }
- {% endif -%}
+ {% endif %}
- {% if group.hello_source -%}
- {%- if group.peer_address -%}
+ {% if group.hello_source %}
+ {% if group.peer_address %}
unicast_src_ip {{ group.hello_source }}
- {%- else -%}
+ {% else %}
mcast_src_ip {{ group.hello_source }}
- {%- endif %}
- {% endif -%}
+ {% endif %}
+ {% endif %}
- {% if group.use_vmac and group.peer_address -%}
+ {% if group.use_vmac and group.peer_address %}
use_vmac {{group.interface}}v{{group.vrid}}
vmac_xmit_base
- {% elif group.use_vmac -%}
+ {% elif group.use_vmac %}
use_vmac {{group.interface}}v{{group.vrid}}
- {% endif -%}
+ {% endif %}
- {% if group.auth_password -%}
+ {% if group.auth_password %}
authentication {
auth_pass "{{ group.auth_password }}"
auth_type {{ group.auth_type }}
}
- {% endif -%}
+ {% endif %}
virtual_ipaddress {
- {% for addr in group.virtual_addresses -%}
+ {% for addr in group.virtual_addresses %}
{{ addr }}
- {% endfor -%}
+ {% endfor %}
}
- {% if group.virtual_addresses_excluded -%}
+ {% if group.virtual_addresses_excluded %}
virtual_ipaddress_excluded {
- {% for addr in group.virtual_addresses_excluded -%}
+ {% for addr in group.virtual_addresses_excluded %}
{{ addr }}
- {% endfor -%}
+ {% endfor %}
}
- {% endif -%}
+ {% endif %}
- {% if group.health_check_script -%}
+ {% if group.health_check_script %}
track_script {
healthcheck_{{ group.name }}
}
- {% endif -%}
+ {% endif %}
}
-{% endfor -%}
+{% endfor %}
-{% for sync_group in sync_groups -%}
+{% for sync_group in sync_groups %}
vrrp_sync_group {{ sync_group.name }} {
group {
- {% for member in sync_group.members -%}
+ {% for member in sync_group.members %}
{{ member }}
- {% endfor -%}
+ {% endfor %}
}
- {% if sync_group.conntrack_sync -%}
+ {% if sync_group.conntrack_sync %}
notify_master "/opt/vyatta/sbin/vyatta-vrrp-conntracksync.sh master {{ sync_group.name }}"
notify_backup "/opt/vyatta/sbin/vyatta-vrrp-conntracksync.sh backup {{ sync_group.name }}"
notify_fault "/opt/vyatta/sbin/vyatta-vrrp-conntracksync.sh fault {{ sync_group.name }}"
- {% endif -%}
+ {% endif %}
}
-{% endfor -%}
+{% endfor %}