Commit 3c0f60fa authored by Daniel Berman's avatar Daniel Berman Committed by GitHub
Browse files

Update main.yml

parent caa6fca9
......@@ -2,29 +2,21 @@
# Installing Elasticsearch
# Add apt-key
- name: Add apt-key
url: ""
state: present
# Add the Elasticsearch APT-repository
- name: Adding Elasticsearch APT repository
repo: deb stable main
state: present
# Install Elasticsearch
- name: Update repos cache, install Elasticsearch
name: elasticsearch
update_cache: yes
# Update Elasticsearch config file to allow remote connections
- name: Updating config file to allow outside access
- shell: sudo wget -qO - | sudo apt-key add -
- shell: sudo apt-get install apt-transport-https
- shell: sudo echo "deb stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-5.x.list
- shell: sudo apt-get update && sudo apt-get install elasticsearch
# Configurations
- name: Updating the config file to allow remote access
destfile: /etc/elasticsearch/elasticsearch.yml
regexp: ''
line: ''
# Start Elasticsearch
- name: Starting Elasticsearch
name: elasticsearch
state: started
- name: Updating the config file to define port
destfile: /etc/elasticsearch/elasticsearch.yml
regexp: 'http.port:'
line: 'http.port: 9200'
# Starting Elasticsearch
- shell: sudo service elasticsearch start
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment