add posibility to disable instance
VIP instance taken from cluster.single metadata can't be disabled. This
change add posibility to disable instance even if this instance is
defined.
Change-Id: I5d478b114d099740aef38e3326ac3454cde926fa
diff --git a/keepalived/files/keepalived.conf b/keepalived/files/keepalived.conf
index 66b5b8c..a7f90c4 100644
--- a/keepalived/files/keepalived.conf
+++ b/keepalived/files/keepalived.conf
@@ -3,6 +3,7 @@
! Configuration File for keepalived
{% for instance_name, instance in cluster.instance.iteritems() %}
+{% if instance.get('enabled', True) %}
vrrp_instance {{ instance_name }} {
{%- if instance.get('nopreempt', True) %}
state BACKUP
@@ -34,4 +35,5 @@
{%- endif %}
}
}
+{% endif %}
{% endfor %}