2019-04-22 15:01:56 -07:00
|
|
|
---
|
|
|
|
# This will install all elastic services for a elastic server
|
|
|
|
# ElasticSearch
|
|
|
|
# Kibana
|
|
|
|
|
|
|
|
- name: Install Elastic server programs
|
|
|
|
hosts: elastic
|
2019-04-23 16:13:44 -07:00
|
|
|
vars:
|
2019-04-24 14:40:05 -07:00
|
|
|
es_cluster_name: 'logging-dev'
|
|
|
|
es_node_name: 'dev-data-01'
|
|
|
|
es_node_master: 'true'
|
|
|
|
es_node_data: 'true'
|
|
|
|
es_path_data: '/var/lib/elasticsearch'
|
|
|
|
es_path_logs: '/var/log/elasticsearch'
|
|
|
|
es_http_port: '9200'
|
|
|
|
es_transport_host: 'localhost'
|
|
|
|
es_transport_port: '9300'
|
|
|
|
k_server_port: 5601
|
|
|
|
k_elasticsearch_hosts: 'http://192.168.0.173:9200'
|
2019-04-22 15:01:56 -07:00
|
|
|
|
|
|
|
tasks:
|
|
|
|
- name: Install Requrements
|
|
|
|
include: install-repo.yml
|
|
|
|
|
|
|
|
- name: Install ElasticSearch from apt
|
|
|
|
become: true
|
|
|
|
apt:
|
|
|
|
name: elasticsearch
|
|
|
|
|
2019-04-24 14:40:05 -07:00
|
|
|
- name: Update ElasticSearch config
|
|
|
|
become: true
|
|
|
|
template:
|
|
|
|
src: elasticsearch.j2
|
|
|
|
dest: /etc/elasticsearch/elasticsearch.yml
|
|
|
|
|
2019-04-22 15:01:56 -07:00
|
|
|
- name: Configure ElasticSearch
|
|
|
|
include: config-elasticsearch.yml
|
|
|
|
|
|
|
|
- name: Install Kibana from apt
|
|
|
|
become: true
|
|
|
|
apt:
|
|
|
|
name: kibana
|
|
|
|
|
2019-04-24 14:40:05 -07:00
|
|
|
- name: Configure Kibana
|
|
|
|
become: true
|
|
|
|
template:
|
|
|
|
src: kibana.j2
|
|
|
|
dest: /etc/kibana/kibana.yml
|
|
|
|
|
2019-04-22 15:01:56 -07:00
|
|
|
- name: Configure Kibana
|
|
|
|
include: config-kibana.yml
|
2019-04-24 14:40:05 -07:00
|
|
|
|
2019-04-25 15:25:52 -07:00
|
|
|
- name: Install Heartbeat
|
|
|
|
become: true
|
|
|
|
apt:
|
|
|
|
name: heartbeat
|
|
|
|
|
2019-04-24 14:40:05 -07:00
|
|
|
#- name: Install Logstash
|
|
|
|
#become: true
|
|
|
|
#apt:
|
|
|
|
#name: logstash
|
|
|
|
|