---

- name: install packages
  apt:
    force_apt_get: true
    install_recommends: false
    name: "{{ hap_packages }}"
  register: apt_status
  retries: 60
  until: apt_status is success or ('Failed to lock apt for exclusive operation' not in apt_status.msg and '/var/lib/dpkg/lock' not in apt_status.msg)

- name: configure
  notify: reload haproxy
  template:
    src: haproxy.cfg.j2
    dest: /etc/haproxy/haproxy.cfg
    backup: true

- meta: flush_handlers

...
