---
- name: Install haproxy 1.8 yum repo
  copy: src=haproxy18.repo dest=/etc/yum.repos.d/ owner=root mode=0544
  when: haproxy_18

- include: multiple-instances.yml
  when: haproxy_multi_instance is defined

- include: single-instance.yml
  when: haproxy_multi_instance is not defined

- name: disable health checks for development envs
  command: 'echo "disable health {{item.name}}" | socat /var/lib/haproxy/stats stdio'
  with_items:
    - "{{ haproxy_applications }}"
  when: develop

---
- name: Install haproxy 1.8 yum repo
  copy: src=haproxy18.repo dest=/etc/yum.repos.d/ owner=root mode=0644
  when: haproxy_18

- include: multiple-instances.yml
  when: haproxy_multi_instance is defined

- include: single-instance.yml
  when: haproxy_multi_instance is not defined

- name: disable health checks for development envs
  command: 'echo "disable health {{item.name}}" | socat /var/lib/haproxy/stats stdio'
  with_items:
    - "{{ haproxy_applications }}"
  when: develop

Set haproxy 1.8 repo file permissions
Haproxy: Set haproxy 1.8 repo file permissions
