Commit 46a9d911 authored by Daniel Berman's avatar Daniel Berman Committed by GitHub
Browse files

Update main.yml

parent 19e42c27
......@@ -3,29 +3,30 @@
# Installing Elasticsearch
#
# Install Elasticsearch
- name: Install Elasticsearch
- shell: sudo wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
- shell: sudo apt-get install apt-transport-https
- shell: sudo echo "deb https://artifacts.elastic.co/packages/5.x/apt 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
- name: Updating the config file to allow remote access
lineinfile:
destfile: /etc/elasticsearch/elasticsearch.yml
regexp: 'network.host:'
line: 'network.host: 0.0.0.0'
- name: Updating the config file to define port
destfile: /etc/elasticsearch/elasticsearch.yml
regexp: 'network.host:'
line: 'network.host: 0.0.0.0'
- name: Updating the config file to define port
lineinfile:
destfile: /etc/elasticsearch/elasticsearch.yml
regexp: 'http.port:'
line: 'http.port: 9200'
destfile: /etc/elasticsearch/elasticsearch.yml
regexp: 'http.port:'
line: 'http.port: 9200'
# Starting Elasticsearch
- name: Enabling Elasticsearch service
systemd:
name: elasticsearch
enabled: yes
daemon_reload: yes
name: elasticsearch
enabled: yes
daemon_reload: yes
# Start Elasticsearch service
- name: Starting Elasticsearch service
systemd:
name: elasticsearch
state: started
name: elasticsearch
state: started
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