-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathelk-deploy.yml
47 lines (42 loc) · 1.62 KB
/
elk-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
# This playbook deploys the whole elk-stack
# Configure and deploy es servers.
#- hosts: pi*
# become: yes
# tasks:
# - name: load custom es-install script
# get_url: url=https://raw.githubusercontent.com/Hooddominator/share/master/es_install.sh dest=/tmp/es_install.sh mode=0755
# - name: execute es-install script
# shell: /tmp/es_install.sh
- hosts: pi*
become: yes
roles:
- { role: geerlingguy.java }
- { role: geerlingguy.elasticsearch }
- hosts: pi6
become: yes
tasks:
- name: define es-master
lineinfile: dest=/usr/share/elasticsearch/config/elasticsearch.yml regexp=^node\.master line=node.master:true
- name: restart master es-service
supervisorctl: name=elasticsearch state=started
- hosts: pi0
become: yes
tasks:
- name: define es-node-client
lineinfile: dest=/usr/share/elasticsearch/config/elasticsearch.yml regexp=^node\.data line="node.data{{':'}} false"
- name: install HQ-Plugin
elasticsearch_plugin: state=present name="royrusso/elasticsearch-HQ"
- name: restart es-node-client
supervisorctl: name=elasticsearch state=started
- name: load custom logstash-install script
get_url: url=https://raw.githubusercontent.com/Hooddominator/share/master/logstash_install.sh dest=/tmp/logstash_install.sh mode=0755
- name: execute logstash-install script
shell: /tmp/logstash_install.sh
- hosts: pi5
become: yes
tasks:
- name: load custom kibana-install script
get_url: url=https://raw.githubusercontent.com/Hooddominator/share/master/kibana_install.sh dest=/tmp/kibana_install.sh mode=0755
- name: execute kibana-install script
shell: /tmp/kibana_install.sh