---

- hosts: localhost
  become: true


  tasks:

  - name: Make Kibana available on all network interfaces
    lineinfile: "dest=/etc/kibana/kibana.yml regexp='^# server.host' line='server.host: \"0.0.0.0\"' state=present"

  - name: Create the Kibana logging directory
    file: path=/etc/kibana/ state=directory owner=kibana

  - name: Enable persistent Kibana logs
    lineinfile: "dest=/etc/kibana/kibana.yml regexp='^# logging.dest' line='logging.dest: /var/log/kibana.log' state=present"

  - name: Start Kibana
    service: name=kibana state=started

---

- hosts: localhost
  become: true


  tasks:

  - name: Make Kibana available on all network interfaces
    lineinfile: "dest=/etc/kibana/kibana.yml regexp='^server.host' line='server.host: \"0.0.0.0\"' state=present"

  - name: Create the Kibana logging directory
    file: path=/var/log/kibana/ state=directory owner=kibana group=kibana

  - name: Enable persistent Kibana logs
    lineinfile: "dest=/etc/kibana/kibana.yml regexp='^logging.dest' line='logging.dest: /var/log/kibana/kibana.log' state=present"

  - name: Start Kibana
    service: name=kibana state=started

FIX make the Logstash runnable multiple times
FIX make the Logstash runnable multiple times
