---
- name: logstash config deamon
  lineinfile:
    dest: /etc/sysconfig/logstash
    regexp: '^START=.*$'
    line: 'START=true'
    state: present
    create: yes
  notify:
          - restart logstash
  when: dockerbuild is undefined

- name: logstash config directory
  file:
       path: /etc/logstash/conf.d
       owner: root
       group: root
       mode: 0755
       state: directory

- name: Add logstash /etc/logstash/conf.d/openshift.conf
  template:
       src: "etc/logstash/conf.d/openshift.conf.j2"
       dest: "/etc/logstash/conf.d/openshift.conf"
       owner: root
       group: root
       mode: 0644
  notify:
          - restart logstash
  when: dockerbuild is undefined

---
- name: logstash config deamon
  lineinfile:
    dest: /etc/sysconfig/logstash
    regexp: '^START=.*$'
    line: 'START=true'
    state: present
    create: yes
  notify:
          - restart logstash
  when: dockerbuild is undefined

- name: logstash config directory
  file:
       path: /etc/logstash/conf.d
       owner: root
       group: root
       mode: 0755
       state: directory

- name: Add logstash /etc/logstash/conf.d/openshift_atomic.conf
  template:
       src: "etc/logstash/conf.d/openshift_atomic.conf.j2"
       dest: "/etc/logstash/conf.d/openshift_atomic.conf"
       owner: root
       group: root
       mode: 0644
  notify:
          - restart logstash
  when: ansible_local.system.is_atomic | bool and dockerbuild is undefined

- name: Add logstash /etc/logstash/conf.d/openshift.conf
  template:
       src: "etc/logstash/conf.d/openshift.conf.j2"
       dest: "/etc/logstash/conf.d/openshift.conf"
       owner: root
       group: root
       mode: 0644
  notify:
          - restart logstash
  when: not ansible_local.system.is_atomic | bool and dockerbuild is undefined

Add logstashconfig atomic on atomic
Add logstashconfig atomic on atomic

  * Add condition to use logstash journald on atomic because we don't have /var/log/messages
