cloud-elasticsearch/templates/opt/elastic/home/config/elasticsearch.yml.j2

64 lines
2.0 KiB
Django/Jinja

---
# ======================== Elasticsearch Configuration =========================
cluster:
name: {{ cloud_name | default('elasticsearch') }}.{{ cloud_stage }}
initial_master_nodes:
{% for node in ansible_hostname.split('-')[:-1] | join('-') | split('\n') | product(range(elastic_cluster_size)) | map('join', '-') %}
- {{ node }}
{% endfor %}
node:
name: {{ ansible_hostname }}
#attr:
# rack: r1
# ----------------------------------- Paths ------------------------------------
path:
data: {{ elastic_data_location }}
logs: {{ elastic_logs_location }}
# ----------------------------------- Memory -----------------------------------
bootstrap:
memory_lock: true
# ---------------------------------- Network -----------------------------------
network:
host: {{ ansible_default_ipv4.address }}
http:
port: 9200
host: 0.0.0.0
# --------------------------------- Discovery ----------------------------------
discovery:
seed_hosts:
{% for node in ansible_hostname.split('-')[:-1] | join('-') | split('\n') | product(range(elastic_cluster_size)) | map('join', '-') %}
- {{ node }}.hnw
{% endfor -%}
# ---------------------------------- Various -----------------------------------
action:
destructive_requires_name: true
#----------------------- BEGIN SECURITY AUTO CONFIGURATION -----------------------
xpack:
security:
enabled: true
enrollment:
enabled: true
http:
ssl:
enabled: true
verification_mode: certificate
keystore:
path: certs/http.p12
transport:
ssl:
enabled: true
verification_mode: certificate
keystore:
path: certs/transport.p12
truststore:
path: certs/transport.p12
transport:
host: 0.0.0.0
#----------------------- END SECURITY AUTO CONFIGURATION -------------------------