summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/templates/vrrp/keepalived.conf.tmpl4
-rwxr-xr-xsrc/conf_mode/vrrp.py3
2 files changed, 5 insertions, 2 deletions
diff --git a/data/templates/vrrp/keepalived.conf.tmpl b/data/templates/vrrp/keepalived.conf.tmpl
index e31bfaac0..b4824a994 100644
--- a/data/templates/vrrp/keepalived.conf.tmpl
+++ b/data/templates/vrrp/keepalived.conf.tmpl
@@ -23,7 +23,9 @@ vrrp_script healthcheck_{{ name }} {
}
{% endif %}
vrrp_instance {{ name }} {
- {{ '# ' ~ group_config.description if group_config.description is defined }}
+{% if group_config.description is defined and group_config.description is not none %}
+ # {{ group_config.description }}
+{% endif %}
state BACKUP
interface {{ group_config.interface }}
virtual_router_id {{ group_config.vrid }}
diff --git a/src/conf_mode/vrrp.py b/src/conf_mode/vrrp.py
index ffe9dd276..e8f1c1f99 100755
--- a/src/conf_mode/vrrp.py
+++ b/src/conf_mode/vrrp.py
@@ -43,7 +43,8 @@ def get_config(config=None):
if not conf.exists(base):
return None
- vrrp = conf.get_config_dict(base, key_mangling=('-', '_'), get_first_key=True)
+ vrrp = conf.get_config_dict(base, key_mangling=('-', '_'),
+ get_first_key=True, no_tag_node_value_mangle=True)
# We have gathered the dict representation of the CLI, but there are default
# options which we need to update into the dictionary retrived.
if 'group' in vrrp: