diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-01-21 18:54:25 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-01-21 18:56:02 +0100 |
commit | 8e50ece56b2644b1562efae1b3f8e07ab8146be9 (patch) | |
tree | bff0deb8169c809ffc359bfa7a00ae98f1966d74 | |
parent | c2e9802037463319eee99ae550d39cf4e8fa8b24 (diff) | |
download | vyos-1x-8e50ece56b2644b1562efae1b3f8e07ab8146be9.tar.gz vyos-1x-8e50ece56b2644b1562efae1b3f8e07ab8146be9.zip |
keepalived: vrrp: T1900: always enable SNMP monitoring
-rwxr-xr-x | src/conf_mode/vrrp.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/conf_mode/vrrp.py b/src/conf_mode/vrrp.py index 1d8477769..a09e55a2f 100755 --- a/src/conf_mode/vrrp.py +++ b/src/conf_mode/vrrp.py @@ -27,7 +27,7 @@ import vyos.keepalived from vyos import ConfigError - +daemon_file = "/etc/default/keepalived" config_file = "/etc/keepalived/keepalived.conf" config_tmpl = """ @@ -145,6 +145,14 @@ vrrp_sync_group {{ sync_group.name }} { """ +daemon_tmpl = """ +# Autogenerated by VyOS +# Options to pass to keepalived + +# DAEMON_ARGS are appended to the keepalived command-line +DAEMON_ARGS="--snmp" +""" + def get_config(): vrrp_groups = [] sync_groups = [] @@ -314,9 +322,12 @@ def generate(data): tmpl = jinja2.Template(config_tmpl) config_text = tmpl.render({"groups": vrrp_groups, "sync_groups": sync_groups}) - with open(config_file, 'w') as f: f.write(config_text) + + with open(daemon_file, 'w') as f: + f.write(daemon_tmpl) + return None def apply(data): |