You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 24, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+94-1Lines changed: 94 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -209,6 +209,97 @@ Then run it:
209
209
ansible-playbook -i hosts ./your-playbook.yml
210
210
```
211
211
212
+
### Installing X-Pack Features
213
+
214
+
X-Pack features, such as Shield, are supported for Elasticsearch 2.4 only. 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:
215
+
216
+
*```es_message_auth_file``` System Key field to allow message authentication. This file should be placed in the 'files' directory.
217
+
*```es_role_mapping``` Role mappings file declared as yml as described [here](https://www.elastic.co/guide/en/shield/current/mapping-roles.html)
218
+
219
+
```
220
+
es_role_mapping:
221
+
power_user:
222
+
- "cn=admins,dc=example,dc=com"
223
+
user:
224
+
- "cn=users,dc=example,dc=com"
225
+
- "cn=admins,dc=example,dc=com"
226
+
```
227
+
228
+
*```es_users``` - Users can be declared here as yml. Two sub keys 'native' and 'file' determine the realm under which realm the user is created. Beneath each of these keys users should be declared as yml entries. e.g.
229
+
230
+
```
231
+
es_users:
232
+
native:
233
+
kibana4_server:
234
+
password: changeMe
235
+
roles:
236
+
- kibana4_server
237
+
file:
238
+
es_admin:
239
+
password: changeMe
240
+
roles:
241
+
- admin
242
+
testUser:
243
+
password: changeMeAlso!
244
+
roles:
245
+
- power_user
246
+
- user
247
+
```
248
+
249
+
250
+
*```es_roles``` - Elasticsearch roles can be declared here as yml. Two sub keys 'native' and 'file' determine how the role is created i.e. either through a file or http(native) call. Beneath each key list the roles with appropriate permissions, using the file based format described [here] (https://www.elastic.co/guide/en/shield/current/_file_based_roles.html) e.g.
251
+
252
+
```
253
+
es_roles:
254
+
file:
255
+
admin:
256
+
cluster:
257
+
- all
258
+
indices:
259
+
- names: '*'
260
+
privileges:
261
+
- all
262
+
power_user:
263
+
cluster:
264
+
- monitor
265
+
indices:
266
+
- names: '*'
267
+
privileges:
268
+
- all
269
+
user:
270
+
indices:
271
+
- names: '*'
272
+
privileges:
273
+
- read
274
+
kibana4_server:
275
+
cluster:
276
+
- monitor
277
+
indices:
278
+
- names: '.kibana'
279
+
privileges:
280
+
- all
281
+
native:
282
+
logstash:
283
+
cluster:
284
+
- manage_index_templates
285
+
indices:
286
+
- names: 'logstash-*'
287
+
privileges:
288
+
- write
289
+
- delete
290
+
- create_index
291
+
```
292
+
293
+
*```es_xpack_license``` - X-Pack license. The license should be declared as a json blob. Alternative use Ansible vault or copy the license to the target machine as part of a playbook and access via a lookup e.g.
For a full example see [here](https://github.com/elastic/ansible-elasticsearch/blob/master/test/integration/xpack.yml)
300
+
301
+
302
+
212
303
### Additional Configuration
213
304
214
305
Additional parameters to es_config allow the customization of the Java and Elasticsearch versions, in addition to role behaviour. Options include:
@@ -219,6 +310,8 @@ Following variables affect the versions installed:
219
310
*```es_version``` (e.g. "2.4.2").
220
311
*```es_api_host``` The host name used for actions requiring HTTP e.g. installing templates. Defaults to "localhost".
221
312
*```es_api_port``` The port used for actions requiring HTTP e.g. installing templates. Defaults to 9200.
313
+
*```es_api_basic_auth_username``` The Elasticsearch username for making admin changing actions. Used if Shield is enabled. Ensure this user is admin.
314
+
*```es_api_basic_auth_password``` The password associated with the user declared in `es_api_basic_auth_username`
222
315
*```es_start_service``` (true (default) or false)
223
316
*```es_plugins_reinstall``` (true or false (default) )
224
317
*```es_plugins``` an array of plugin definitions e.g.:
@@ -239,7 +332,7 @@ es_java_opts:
239
332
Earlier examples illustrate the installation of plugins for 2.x. The correct use of this parameter varies depending on the version of Elasticsearch being installed:
240
333
241
334
- 2.x. - For officially supported plugins no version or source delimiter is required. The plugin script will determine the appropriate plugin version based on the target Elasticsearch version.
242
-
For community based plugins include the full path e.g. "lmenezes/elasticsearch-kopf" and the appropriate version for the target version of Elasticsearch.
335
+
For community based plugins include the full path e.g. "lmenezes/elasticsearch-kopf" and the appropriate version for the target version of Elasticsearch. This approach should NOT be used for X-Pack related plugins e.g. Shield. See X-Pack below for details here.
243
336
244
337
If installing Marvel or Watcher, ensure the license plugin is also specified. Shield configuration is currently not supported but planned for later versions.
0 commit comments