State module to manage Elasticsearch.
New in version 2017.7.0.
Ensure that the index alias is absent.
Name of the index alias to remove
Name of the index for the alias
Ensure that the named index alias is present.
Name of the alias
Name of the index
Optional dict for filters as per https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html
Example:
mytestalias:
elasticsearch.alias_present:
- index: testindex
- definition:
filter:
term:
user: kimchy
Ensure that the named index is absent.
Name of the index to remove
Ensure that the named index is present.
Name of the index to add
Optional dict for creation parameters as per https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html
Example:
# Default settings
mytestindex:
elasticsearch_index.present
# Extra settings
mytestindex2:
elasticsearch_index.present:
- definition:
settings:
index:
number_of_shards: 10
Ensure that the named index template is absent.
Name of the index to remove
Ensure that the named index template is present.
Name of the index to add
Required dict for creation parameters as per https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html
If the template already exists and the definition is up to date
Example:
mytestindex2_template:
elasticsearch.index_template_present:
- definition:
template: logstash-*
order: 1
settings:
number_of_shards: 1
Ensure that the named pipeline is absent
Name of the pipeline to remove
Ensure that the named pipeline is present.
Name of the index to add
Required dict for creation parameters as per https://www.elastic.co/guide/en/elasticsearch/reference/master/pipeline.html
Example:
test_pipeline:
elasticsearch.pipeline_present:
- definition:
description: example pipeline
processors:
- set:
field: collector_timestamp_millis
value: '{{ '{{' }}_ingest.timestamp{{ '}}' }}'
Ensure that the search template is absent
Name of the search template to remove
Ensure that the named search template is present.
Name of the search template to add
Required dict for creation parameters as per http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html
Example:
test_pipeline:
elasticsearch.search_template_present:
- definition:
inline:
size: 10