Merge "Alter default shard count in index templates"
This commit is contained in:
commit
d12caed056
@ -34,6 +34,9 @@ elastic_data_interface: "{{ ansible_default_ipv4['alias'] }}"
|
||||
## Elasticsearch index template settings
|
||||
# Set the default max number of fields used in a query
|
||||
# elastic_max_docvalue_fields_search: "100"
|
||||
# Set the number of primary shards for each index
|
||||
# (defaults to the number of Elasticsearch data nodes)
|
||||
# elastic_primary_shard_count: 1
|
||||
|
||||
# The set of nodes used for elasticsearch discovery
|
||||
# elasticsearch_discovery_seed_hosts: "{{ (elastic_hosts | union(groups['kibana'])) | map('extract', hostvars, 'ansible_host') | list }}"
|
||||
|
@ -169,6 +169,7 @@ elasticsearch_number_of_replicas: "{{ ((data_nodes | length) > 2) | ternary('2',
|
||||
elasticsearch_beat_settings:
|
||||
number_of_replicas: "{{ elasticsearch_number_of_replicas }}"
|
||||
max_docvalue_fields_search: "{{ elastic_max_docvalue_fields_search | default('100') }}"
|
||||
shard_count: "{{ elastic_primary_shard_count | default(elasticsearch_data_node_details | length) }}"
|
||||
|
||||
# Shuffled elasticsearch endpoints (with localhost if relevant) for use in beat config files
|
||||
elasticsearch_data_hosts: |-
|
||||
|
@ -281,7 +281,7 @@ setup.template.fields: "${path.config}/fields.yml"
|
||||
# Overwrite existing template
|
||||
setup.template.overwrite: {{ host == data_nodes[0] | default(false)}}
|
||||
|
||||
{% set shards = 1 %}
|
||||
{% set shards = elasticsearch_beat_settings.shard_count | int %}
|
||||
|
||||
# Elasticsearch template settings
|
||||
setup.template.settings:
|
||||
|
Loading…
Reference in New Issue
Block a user