---
- include: install-Debian.yml
  when: ansible_os_family == 'Debian'

- include: install-Generic.yml
  when: ansible_os_family != 'Debian'

- name: Enabling and starting HAproxy service
  service:
    name: haproxy
    state: started
    enabled: true

---
- include: install-Debian.yml
  when: ansible_os_family == 'Debian'

- include: install-Generic.yml
  when: ansible_os_family != 'Debian'

- name: Enabling and starting HAproxy service
  service:
    name: "{{ haproxy_service }}"
    state: started
    enabled: true

Replace hard-coded service name with variable
Replace hard-coded service name with variable
