---

- name: download kibana
  get_url: url={{ kibana_url }} dest=/tmp/kibana.tar.gz
  tags:
    - kibana

- name: extract kibana
  unarchive: src=/tmp/kibana.tar.gz dest=/opt/ copy=no
  tags:
    - kibana

- name: rename the kibana folder from kibana-4.0.2-linux-x64/ to kibana/
  command: mv /opt/kibana-4.0.2-linux-x64 /opt/kibana
  tags:
    - kibana

- name: add kibana user
  user: name=kibana home=/opt/kibana/ system=yes
  tags:
    - kibana

- name: ensure correct permissions on /opt/kibana
  file: path=/opt/kibana/ owner=kibana group=kibana mode=0740
  tags:
    - kibana

- include: redhat.yml
  when: ansible_os_family == "RedHat"

---

- name: download kibana
  get_url: url={{ kibana_url }} dest=/tmp/kibana.tar.gz
           sha256sum=c925f75cd5799bfd892c7ea9c5936be10a20b119
  tags:
    - kibana

- name: extract kibana
  unarchive: src=/tmp/kibana.tar.gz dest=/opt/ copy=no
  tags:
    - kibana

- name: rename the kibana folder from kibana-4.0.2-linux-x64/ to kibana/
  command: mv /opt/kibana-4.0.2-linux-x64 /opt/kibana
  tags:
    - kibana

- name: add kibana user
  user: name=kibana home=/opt/kibana/ system=yes
  tags:
    - kibana

- name: ensure correct permissions on /opt/kibana
  file: path=/opt/kibana/ owner=kibana group=kibana mode=0740
  tags:
    - kibana

- include: redhat.yml
  when: ansible_os_family == "RedHat"

Add our sha256sum in to ensure integrity of download
Add our sha256sum in to ensure integrity of download
