diff --git a/roles/ceph-rgw-loadbalancer/templates/keepalived.conf.j2 b/roles/ceph-rgw-loadbalancer/templates/keepalived.conf.j2 index 8793680f8..0c9378d3b 100644 --- a/roles/ceph-rgw-loadbalancer/templates/keepalived.conf.j2 +++ b/roles/ceph-rgw-loadbalancer/templates/keepalived.conf.j2 @@ -15,8 +15,8 @@ vrrp_script check_haproxy { {% for instance in vrrp_instances %} vrrp_instance {{ instance['name'] }} { - state {{ 'MASTER' if ansible_facts['hostname'] == instance['master'] else 'BACKUP' }} - priority {{ '100' if ansible_facts['hostname'] == instance['master'] else '90' }} + state {{ 'MASTER' if inventory_hostname == instance['master'] else 'BACKUP' }} + priority {{ '100' if inventory_hostname == instance['master'] else '90' }} interface {{ virtual_ip_interface }} virtual_router_id {{ 50 + loop.index }} advert_int 1