Skip to content

Commit

Permalink
minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
JanSkalny committed Aug 2, 2024
1 parent b8762c3 commit 5f725d3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docker-proxy/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@
- reload systemd
- restart docker

# XXX: other tasks might rely on docker connectivity... run handlers
- meta: flush_handlers
1 change: 1 addition & 0 deletions elk/elasticsearch/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
with_items:
- /etc/elasticsearch/elasticsearch.yml
- /etc/elasticsearch/elasticsearch.keystore
tags: configure

- name: prepare systemd override directory
file:
Expand Down
6 changes: 6 additions & 0 deletions elk/elasticsearch/templates/elasticsearch.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
cluster:
name: "{{ elastic_cluster_name }}"
{% if 'master' in elastic_node_roles and elastic_version.split('.') | first | int >= 7 %}
{% if elastic_master_nodes | length > 1 %}
initial_master_nodes: {{ elastic_master_nodes | to_json }}
{% endif %}
{% if elastic_custom_cluster_settings | default(False) %}
{{ elastic_custom_cluster_settings | to_nice_yaml(indent=2) }}
{% endif %}
Expand All @@ -18,6 +20,7 @@ node:
roles: {{ elastic_node_roles | to_json }}
{% endif %}

{% if elastic_master_nodes | length > 1 %}
{% if elastic_version.split('.') | first | int <= 6 %}
discovery.zen:
ping.unicast.hosts: {{ elastic_master_nodes | to_json }}
Expand All @@ -26,6 +29,9 @@ discovery.zen:
{% if elastic_version.split('.') | first | int >= 7 %}
discovery.seed_hosts: {{ elastic_master_nodes | to_json }}
{% endif %}
{% else %}
discovery.type: single-node
{% endif %}

path:
logs: "{{ elastic_log_path }}"
Expand Down

0 comments on commit 5f725d3

Please sign in to comment.