Created
July 20, 2015 20:45
-
-
Save dhrrgn/f0959a80bae13b430677 to your computer and use it in GitHub Desktop.
Ansible playbook for installing Elasticsearch (does not include configuration)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| - name: Add the Oracle Java PPA | |
| apt_repository: repo='ppa:webupd8team/java' state=present update_cache=yes | |
| - name: Automatically select the Oracle License | |
| debconf: name=oracle-java8-installer question=shared/accepted-oracle-license-v1-1 value=true vtype=select | |
| - name: Install Java 8 | |
| apt: pkg=oracle-java8-installer force=yes state=installed | |
| - name: Install ES PGP Key | |
| apt_key: url=http://packages.elasticsearch.org/GPG-KEY-elasticsearch state=present | |
| - name: Add Elasticsearch APT Repo | |
| apt_repository: repo='deb http://packages.elasticsearch.org/elasticsearch/1.7/debian stable main' state=present update_cache=yes | |
| - name: Install Elasticsearch | |
| apt: name=elasticsearch=1.7.0 update_cache=yes force=yes | |
| - name: Restarting ElasticSearch | |
| service: name=elasticsearch state=restarted | |
| - name: Ensure Elasticsearch starts at startup | |
| service: name=elasticsearch enabled=yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment