diff --git a/roles/lb/templates/keepalived-backup.conf.j2 b/roles/lb/templates/keepalived-backup.conf.j2 index 38cdaa2..8af5c3c 100644 --- a/roles/lb/templates/keepalived-backup.conf.j2 +++ b/roles/lb/templates/keepalived-backup.conf.j2 @@ -7,8 +7,9 @@ vrrp_instance VI-kube-master { priority 110 unicast_src_ip {{ inventory_hostname }} unicast_peer { - {% for h in groups['lb'] %}{% if h != inventory_hostname %}{{ h }}{% endif %}{% endfor %} - +{% for h in groups['lb'] %}{% if h != inventory_hostname %} + {{ h }} +{% endif %}{% endfor %} } dont_track_primary interface {{ LB_IF }} diff --git a/roles/lb/templates/keepalived-master.conf.j2 b/roles/lb/templates/keepalived-master.conf.j2 index 367bb3c..ea01955 100644 --- a/roles/lb/templates/keepalived-master.conf.j2 +++ b/roles/lb/templates/keepalived-master.conf.j2 @@ -13,8 +13,9 @@ vrrp_instance VI-kube-master { priority 120 unicast_src_ip {{ inventory_hostname }} unicast_peer { - {% for h in groups['lb'] %}{% if h != inventory_hostname %}{{ h }}{% endif %}{% endfor %} - +{% for h in groups['lb'] %}{% if h != inventory_hostname %} + {{ h }} +{% endif %}{% endfor %} } dont_track_primary interface {{ LB_IF }}