---
- name: Kibana installed
  community.general.pkgng:
    name: "kibana7"
    state: latest

- name: Kibana enabled
  shell: sysrc kibana_enable="YES"

- name: Kibana config file installed
  copy:
    src: kibana.yml
    dest: /usr/local/etc/kibana/kibana.yml
    owner: root
    mode: 0644
  notify: Kibana restarted

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