This commit is contained in:
2025-09-02 18:19:14 +02:00
parent c3b393694f
commit 61f680dc97
4 changed files with 282 additions and 0 deletions

View File

@ -0,0 +1,47 @@
# ======================== Elasticsearch Configuration =========================
# ANSIBLE MANAGED FILE: Do not edit directly. Changes will be overwritten.
#
# ---------------------------------- Cluster -----------------------------------
cluster.name: "{{ es_cluster_name }}"
# ------------------------------------ Node ------------------------------------
node.name: "{{ es_node_name }}"
# ----------------------------------- Paths ------------------------------------
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
# ----------------------------------- Memory -----------------------------------
# Lock the memory on startup to prevent the OS from swapping it out.
bootstrap.memory_lock: true
# ---------------------------------- Network -----------------------------------
# Bind to the host's private IP address for cluster communication.
network.host: "{{ es_network_host }}"
http.port: 9200
# --------------------------------- Discovery ----------------------------------
# A list of hosts to contact to discover the cluster.
discovery.seed_hosts: {{ es_seed_hosts | to_json }}
# Bootstrap the cluster using an initial set of master-eligible nodes.
cluster.initial_master_nodes: {{ es_initial_master_nodes | to_json }}
# ---------------------------------- Security ----------------------------------
# Security features are enabled by default on Elasticsearch 8.0+
# On first start, a password for the 'elastic' user and a Kibana enrollment
# token will be generated in the output of the 'elasticsearch' service.
# You can also generate them manually later.
xpack.security.enabled: true
xpack.security.enrollment.enabled: true
# These settings configure TLS for HTTP and transport (inter-node) layers.
# Elasticsearch automatically generates these certificates on first startup.
xpack.security.http.ssl:
enabled: true
keystore.path: certs/http.p12
xpack.security.transport.ssl:
enabled: true
verification_mode: certificate
keystore.path: certs/transport.p12
truststore.path: certs/transport.p12

5
templates/jvm.options.j2 Normal file
View File

@ -0,0 +1,5 @@
# ANSIBLE MANAGED FILE: Sets the JVM heap size for Elasticsearch.
# Set initial and maximum heap size to the same value to avoid
# pauses due to heap resizing at runtime.
-Xms{{ es_heap_size }}
-Xmx{{ es_heap_size }}