vrrp_script chk_haproxy {
  script "killall -0 haproxy" # check the haproxy process
  interval 2 # every 2 seconds
  weight 2 # add 2 points if OK
}

vrrp_instance VI_1 {
  interface {{ first_adapter }}
  state {{ startcloud_keepalived_state }} #MASTER
  virtual_router_id {{  startcloud_keepalived_virtual_router_id }}
  priority {{  startcloud_keepalived_priority }}
  advert_int 1
  authentication {
      auth_type PASS
      auth_pass {{  startcloud_keepalived_auth_pass }}
    }
  virtual_ipaddress {
    {{  startcloud_keepalived_virtual_ipaddress }}
  }
  track_script {
    chk_haproxy
  }
}
