Skip to content

Commit

Permalink
fix keepalived config so proper master is identified (#110)
Browse files Browse the repository at this point in the history
Signed-off-by: Nick M <[email protected]>
  • Loading branch information
rkage authored Feb 16, 2021
1 parent cfeec85 commit 0586a6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ansible/roles/keepalived/templates/keepalived.conf.j2
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
vrrp_instance VI_1 {
state {{ 'MASTER' if hostvars[groups['masters'][0]] else 'BACKUP' }}
state {{ 'MASTER' if inventory_hostname in groups['controlplane']|first else 'BACKUP' }}
interface {{ keepalived_interface }}
virtual_router_id 1
priority {{ '150' if hostvars[groups['masters'][0]] else '100' }}
priority {{ '150' if inventory_hostname in groups['controlplane']|first else '100' }}
advert_int 1
authentication {
auth_type PASS
Expand Down

0 comments on commit 0586a6f

Please sign in to comment.