Add optional curator ES index management tool.
This satisfies a request from the original upstream ansible-elk playbook to add curator. Curator is the recommended tool for managing Elasticsearch indexes. This optional playbook will install curator on the ELK stack node. To activate this functionality, set the following variable: install_curator_tool: true The default option is to set this to false, blank or anything but 'true'. https://github.com/sadsfae/ansible-elk/issues/4 https://www.elastic.co/guide/en/elasticsearch/client/curator/current/index.html Patchset #2: update README.srt documentation. Patchset #3: changed to a boolean value for install_curator_tool Patchset #4: update commit message Documentation update here: ttp://rst.ninjs.org/?n=ff7d6c5da70ba656717633b304981532&theme=basic Change-Id: I12a7662a9fd27671160f3ca10ee37b5f73df4459
This commit is contained in:
parent
7c0d21c32f
commit
5f5ee56b4b
@ -89,6 +89,11 @@ as needed. You can also change the logging backend to use fluentd via the
|
||||
``logging_backend:`` variable. For most uses leaving the defaults in place is
|
||||
accceptable. If left unchanged the default is to use logstash.
|
||||
|
||||
You can also install the optional `curator <https://www.elastic.co/guide/en/elasticsearch/client/curator/current/index.html>`_ tool for managing
|
||||
elasticsearch indexes. Set ``install_curator_tool: true`` to enable this optional tool installation.
|
||||
|
||||
If all the variables look ok in ``install/group_vars/all.yml`` you can proceed with deployment.
|
||||
|
||||
::
|
||||
|
||||
ansible-playbook -i hosts install/elk.yml
|
||||
|
@ -10,4 +10,5 @@
|
||||
- { role: fluentd, when: (logging_backend == 'fluentd') }
|
||||
- { role: logstash, when: ((logging_backend is none) or (logging_backend == 'logstash')) }
|
||||
- { role: nginx }
|
||||
- { role: curator, when: install_curator_tool }
|
||||
- { role: kibana }
|
||||
|
@ -151,3 +151,9 @@ logstash_syslog_port: 5044
|
||||
fluentd_syslog_port: 42185
|
||||
fluentd_http_port: 9919
|
||||
fluentd_debug_port: 24230
|
||||
### install curator tool ###
|
||||
# curator is the recommended tool for managing elasticsearch indexes
|
||||
# https://www.elastic.co/guide/en/elasticsearch/client/curator/current/index.html
|
||||
# default is no (set to blank) or false
|
||||
# set the below variable to 'true' to activate
|
||||
install_curator_tool: false
|
||||
|
6
ansible/install/roles/curator/files/curator.repo
Normal file
6
ansible/install/roles/curator/files/curator.repo
Normal file
@ -0,0 +1,6 @@
|
||||
[curator-3]
|
||||
name=CentOS/RHEL 7 repository for Elasticsearch Curator 3.x packages
|
||||
baseurl=http://packages.elastic.co/curator/3/centos/7
|
||||
gpgcheck=1
|
||||
gpgkey=http://packages.elastic.co/GPG-KEY-elasticsearch
|
||||
enabled=1
|
28
ansible/install/roles/curator/tasks/main.yml
Normal file
28
ansible/install/roles/curator/tasks/main.yml
Normal file
@ -0,0 +1,28 @@
|
||||
|
||||
---
|
||||
#
|
||||
# install curator tool for managing elasticsearch
|
||||
#
|
||||
|
||||
- name: Copy curator yum repo file
|
||||
copy:
|
||||
src=curator.repo
|
||||
dest=/etc/yum.repos.d/curator.repo
|
||||
owner=root
|
||||
group=root
|
||||
mode=0644
|
||||
become: true
|
||||
when: install_curator_tool
|
||||
|
||||
- name: Import curator GPG Key
|
||||
rpm_key: key=http://packages.elastic.co/GPG-KEY-elasticsearch
|
||||
state=present
|
||||
when: install_curator_tool
|
||||
|
||||
- name: Install curator and python-setuptools
|
||||
yum: name={{ item }} state=present
|
||||
become: true
|
||||
with_items:
|
||||
- python-elasticsearch-curator
|
||||
- python-setuptools
|
||||
when: install_curator_tool
|
Loading…
x
Reference in New Issue
Block a user