summaryrefslogtreecommitdiff
path: root/data/templates/high-availability
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2023-09-05 10:52:41 +0000
committerViacheslav Hletenko <v.gletenko@vyos.io>2023-09-05 10:52:41 +0000
commit5ae730a52de2f284e45cd433bb0cf66c8508f2f7 (patch)
treee5e64fac1435bf5d71699d664fc992ba3f2ad137 /data/templates/high-availability
parent487c817ea320ddabcdaf41a8112937a29c19443e (diff)
downloadvyos-1x-5ae730a52de2f284e45cd433bb0cf66c8508f2f7.tar.gz
vyos-1x-5ae730a52de2f284e45cd433bb0cf66c8508f2f7.zip
T5480: Ability to disable SNMP for keepalived service VRRP
By default we enable `--snmp` for keepalived unit service Add ability to disable it set high-availability vrrp disable-snmp
Diffstat (limited to 'data/templates/high-availability')
-rw-r--r--data/templates/high-availability/10-override.conf.j216
1 files changed, 16 insertions, 0 deletions
diff --git a/data/templates/high-availability/10-override.conf.j2 b/data/templates/high-availability/10-override.conf.j2
new file mode 100644
index 000000000..d1cb25581
--- /dev/null
+++ b/data/templates/high-availability/10-override.conf.j2
@@ -0,0 +1,16 @@
+### Autogenerated by ${vyos_conf_scripts_dir}/high-availability.py ###
+{% set snmp = '' if vrrp.disable_snmp is vyos_defined else '--snmp' %}
+[Unit]
+After=vyos-router.service
+# Only start if there is our configuration file - remove Debian default
+# config file from the condition list
+ConditionFileNotEmpty=
+ConditionFileNotEmpty=/run/keepalived/keepalived.conf
+
+[Service]
+KillMode=process
+Type=simple
+# Read configuration variable file if it is present
+ExecStart=
+ExecStart=/usr/sbin/keepalived --use-file /run/keepalived/keepalived.conf --pid /run/keepalived/keepalived.pid --dont-fork {{ snmp }}
+PIDFile=/run/keepalived/keepalived.pid