---
- name: EL...
  when: ansible_os_family == 'RedHat'
  include: EL.yml

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

- name: configure...
  template: >-
    src=etc/logstash/conf.d/{{item}}.j2
    dest=/etc/logstash/conf.d/{{item}}
    owner=root
    group=root
    mode=0644
  with_items: 
    - "{{config_files | to_json}}"

- name: boot logstash service
  service: name=logstash enabled=yes state=started

---
- name: EL...
  when: ansible_os_family == 'RedHat'
  include: EL.yml

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

- name: configure...
  template: >-
    src=etc/logstash/conf.d/{{item}}.j2
    dest=/etc/logstash/conf.d/{{item}}
    owner=root
    group=root
    mode=0644
  with_items:  "{{config_files}}"

- name: boot logstash service
  service: name=logstash enabled=yes state=started

Remove use of to_json - not required
Remove use of to_json - not required
