configure_master_healthcheck.yml 438 B

12345678910111213141516171819
  1. ---
  2. - name: refresh yum cache
  3. command: yum clean all
  4. args:
  5. warn: no
  6. when: ansible_os_family == "RedHat"
  7. - name: install haproxy
  8. package: name=haproxy state=present
  9. register: result
  10. until: result is succeeded
  11. retries: 10
  12. delay: 10
  13. - name: configure haproxy
  14. template: src=master_healthcheck.j2 dest=/etc/haproxy/haproxy.cfg
  15. - name: start and enable haproxy service
  16. service: name=haproxy state=started enabled=yes