Skip to content

Commit f664580

Browse files
author
Dale McDiarmid
committed
Ability to disable x-pack features
1 parent 1a20745 commit f664580

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,11 @@ ansible-playbook -i hosts ./your-playbook.yml
210210

211211
### Installing X-Pack Features
212212

213-
X-Pack features, such as Security, are supported. This feature is currently experimental. To enable X-Pack set the parameter `es_enable_xpack` to true and list the required features in the parameter `es_xpack_features`. The following additional parameters allow X-Pack to be configured:
213+
X-Pack features, such as Security, are supported. This feature is currently experimental. To enable X-Pack set the parameter `es_enable_xpack` to true and list the required features in the parameter `es_xpack_features`.
214+
215+
The parameter `es_xpack_features` by default enables all features i.e. it defaults to ["alerting","monitoring","graph","security","reporting"]
216+
217+
The following additional parameters allow X-Pack to be configured:
214218

215219
* ```es_message_auth_file``` System Key field to allow message authentication. This file should be placed in the 'files' directory.
216220
* ```es_role_mapping``` Role mappings file declared as yml as described [here](https://www.elastic.co/guide/en/x-pack/current/mapping-roles.html)

defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ es_work_dir: "/tmp/elasticsearch"
2424
es_max_open_files: 65536
2525
es_allow_downgrades: false
2626
es_enable_xpack: false
27-
es_xpack_features: []
27+
es_xpack_features: ["alerting","monitoring","graph","security","reporting"]
2828
#These are used for internal operations performed by ansible.
2929
#They do not effect the current configuration
3030
es_api_host: "localhost"

templates/elasticsearch.yml.j2

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,19 @@ path.work: {{ work_dir }}
2323
{% endif %}
2424

2525
path.logs: {{ log_dir }}
26+
27+
{% if not "security" in es_xpack_features %}
28+
xpack.security.enabled: false
29+
{% endif %}
30+
31+
{% if not "monitoring" in es_xpack_features %}
32+
xpack.monitoring.enabled: false
33+
{% endif %}
34+
35+
{% if not "alerting" in es_xpack_features %}
36+
xpack.watcher.enabled: false
37+
{% endif %}
38+
39+
{% if not "reporting" in es_xpack_features %}
40+
xpack.reporting.enabled: false
41+
{% endif %}

0 commit comments

Comments
 (0)