Skip to content

Instantly share code, notes, and snippets.

@hagbarddenstore
Last active November 10, 2015 14:34
Show Gist options
  • Save hagbarddenstore/43225ed33ab11676a88a to your computer and use it in GitHub Desktop.
Save hagbarddenstore/43225ed33ab11676a88a to your computer and use it in GitHub Desktop.
- name: check if elasticsearch is installed
command: dpkg-query -W elasticsearch
register: elasticsearch_deb
failed_when: elasticsearch_deb.rc > 1
changed_when: elasticsearch_deb.rc == 1
- name: download elasticsearch
get_url:
url=https://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/2.0.0/elasticsearch-2.0.0.deb
dest=/tmp/elasticsearch.deb
when: elasticsearch_deb.rc == 1
tags: download
- name: install elasticsearch
apt:
deb=/tmp/elasticsearch.deb
when: elasticsearch_deb.rc == 1
tags: installation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment