Skip to content

Instantly share code, notes, and snippets.

@zaiste
Last active March 3, 2017 10:42
Show Gist options
  • Save zaiste/5957394 to your computer and use it in GitHub Desktop.
Save zaiste/5957394 to your computer and use it in GitHub Desktop.
Ansible: ElasticSearch + NodeJS
---
- hosts: vagrant
user: vagrant
tasks:
- name: install python-apt
raw: "apt-get install -y python-apt"
- name: Install python-software-properties
apt: pkg=python-software-properties state=installed
- name: Install NodeJS PPA
apt_repository: repo=ppa:chris-lea/node.js
- apt_repository: repo=ppa:nginx/stable
- name: update apt cache
apt: update-cache=yes
- name: NodeJS
apt: pkg=nodejs state=installed
- name: Nginx
apt: pkg=nginx state=installed
- npm: name=coffee-script global=yes
- npm: name=yo global=yes
- npm: name=bower global=yes
- npm: name=grunt-cli global=yes
- npm: name=karma global=yes
- name: Copy OAB file
copy: src=./oab-java.sh dest=/root/oab-java.sh mode=777
- name: Extract JRE and build local repository
command: chdir=/root creates=/root/oab-java.sh.log /root/oab-java.sh -7
- name: Install JRE
apt: pkg=oracle-java7-jre state=installed
- name: Download ElasticSearch
get_url: url=https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.2.deb dest=~/elasticsearch-0.90.2.deb
- name: Install ES .deb file
shell: dpkg -i ~/elasticsearch-0.90.2.deb
- name: Install ES Head
command: /usr/share/elasticsearch/bin/plugin -install mobz/elasticsearch-head
- name: Install ES Paramedic
command: /usr/share/elasticsearch/bin/plugin -install karmi/elasticsearch-paramedic
- name: Install ES BigDesk
command: /usr/share/elasticsearch/bin/plugin -install lukas-vlcek/bigdesk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment