6ebca3d78f
When running a multi-node ELK stack (5+ nodes) the elasticsearch server needs to be able to mark and identify nodes that will be data and master nodes. This change ensures that the first set of available master nodes is mark accordingly as both data and master and that all other nodes are marked as cluster members with alternating nodes being marked as data nodes. With this change the cluster will be able to grow as well as handle large data sets more efficiently. This change ensures that sharding is correctly started when the cluster is deployed and that the beat services are using the recommended sharding practices. Change-Id: Id555132199f268b21aaa939a84760c744238dd2b Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
56 lines
1.2 KiB
YAML
56 lines
1.2 KiB
YAML
---
|
|
- name: Install Kibana
|
|
hosts: kibana
|
|
become: true
|
|
vars_files:
|
|
- vars/variables.yml
|
|
tasks:
|
|
- include_tasks: common_task_install_elk_repo.yml
|
|
|
|
- name: Ensure Nginx is installed
|
|
apt:
|
|
name: "{{ item }}"
|
|
state: present
|
|
update_cache: yes
|
|
with_items:
|
|
- nginx
|
|
- apache2-utils
|
|
- python-passlib
|
|
|
|
- name: create kibana user to access web interface
|
|
htpasswd:
|
|
path: "/etc/nginx/htpasswd.users"
|
|
name: "{{ kibana_username }}"
|
|
password: "{{ kibana_password }}"
|
|
owner: root
|
|
mode: 0644
|
|
|
|
- name: Drop Nginx default conf file
|
|
template:
|
|
src: templates/nginx_default.j2
|
|
dest: /etc/nginx/sites-available/default
|
|
|
|
- name: Enable and restart nginx
|
|
service:
|
|
name: "nginx"
|
|
enabled: true
|
|
state: restarted
|
|
|
|
- name: Ensure kibana is installed
|
|
apt:
|
|
name: kibana
|
|
state: present
|
|
update_cache: yes
|
|
|
|
- name: Drop kibana conf file
|
|
template:
|
|
src: templates/kibana.yml.j2
|
|
dest: /etc/kibana/kibana.yml
|
|
mode: "0666"
|
|
|
|
- name: Enable and restart kibana
|
|
systemd:
|
|
name: "kibana"
|
|
enabled: true
|
|
state: restarted
|