Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Ijaz Ahmad
ansible-elk-playbook
Commits
3c0f60fa
Commit
3c0f60fa
authored
Jul 24, 2017
by
Daniel Berman
Committed by
GitHub
Jul 24, 2017
Browse files
Update main.yml
parent
caa6fca9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
21 deletions
+13
-21
roles/elasticsearch/tasks/main.yml
roles/elasticsearch/tasks/main.yml
+13
-21
No files found.
roles/elasticsearch/tasks/main.yml
View file @
3c0f60fa
...
...
@@ -2,29 +2,21 @@
#
# Installing Elasticsearch
#
# Add apt-key
-
name
:
Add apt-key
apt_key
:
url
:
"
https://artifacts.elastic.co/GPG-KEY-elasticsearch"
state
:
present
# Add the Elasticsearch APT-repository
-
name
:
Adding Elasticsearch APT repository
apt_repository
:
repo
:
deb https://artifacts.elastic.co/packages/5.x/apt stable main
state
:
present
# Install Elasticsearch
-
name
:
Update repos cache, install Elasticsearch
apt
:
name
:
elasticsearch
update_cache
:
yes
#
Update Elasticsearch config file to allow remote connec
tions
-
name
:
Updating config file to allow
outsid
e access
-
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
#
Configura
tions
-
name
:
Updating
the
config file to allow
remot
e access
lineinfile
:
destfile
:
/etc/elasticsearch/elasticsearch.yml
regexp
:
'
network.host:'
line
:
'
network.host:
0.0.0.0'
# Start Elasticsearch
-
name
:
Starting Elasticsearch
service
:
name
:
elasticsearch
state
:
started
-
name
:
Updating the config file to define port
lineinfile
:
destfile
:
/etc/elasticsearch/elasticsearch.yml
regexp
:
'
http.port:'
line
:
'
http.port:
9200'
# Starting Elasticsearch
-
shell
:
sudo service elasticsearch start
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment