--- keepalived_vrrp_instances: VI_1: state: MASTER interface: eth0 virtual_router_id: 51 priority: 254 authentication: auth_type: PASS auth_pass: asdf unicast_peer: | {{ groups['rabbitmq_servers'] | map('extract', hostvars, ['ansible_eth0', 'ipv4', 'address']) | difference([ansible_default_ipv4.address])| list }} virtual_ipaddress: - 10.100.100.20/24 track_script: - chk_rabbitmq - chk_amqp_port