From 357865e8a0c576efb0d6fe1c80eb55339023a69f Mon Sep 17 00:00:00 2001 From: Thomas Widhalm Date: Tue, 12 Sep 2023 16:11:14 +0200 Subject: [PATCH] Use common variable for TLS fixes #248 This is something between a workaround and a partial solution. While it makes more sense to use a role related variable for both Logstash and Elasticsearch output (other than before) it's still not the goal we want. So overhauling the whole process of determining whether we need TLS or not is due. I'll start a discussion and we need to adjust all roles to the solution we find. Now there are similarities but it's not exactly the same in every role. --- roles/beats/templates/auditbeat.yml.j2 | 2 +- roles/beats/templates/metricbeat.yml.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/beats/templates/auditbeat.yml.j2 b/roles/beats/templates/auditbeat.yml.j2 index 3a72c505..ddbd4d2a 100644 --- a/roles/beats/templates/auditbeat.yml.j2 +++ b/roles/beats/templates/auditbeat.yml.j2 @@ -31,7 +31,7 @@ setup.template.settings: setup.kibana: {% if beats_auditbeat_output == "elasticsearch" %} output.elasticsearch: -{% if elasticsearch_http_security | bool %} +{% if beats_security | bool %} {% if elasticstack_full_stack | bool %} hosts: [ {% for host in groups['elasticsearch'] %}"https://{{ host }}:{{ elasticstack_elasticsearch_http_port }}"{% if not loop.last %},{% endif %}{% endfor %}] {% else %} diff --git a/roles/beats/templates/metricbeat.yml.j2 b/roles/beats/templates/metricbeat.yml.j2 index 86186f35..b13341e5 100644 --- a/roles/beats/templates/metricbeat.yml.j2 +++ b/roles/beats/templates/metricbeat.yml.j2 @@ -8,7 +8,7 @@ setup.template.settings: setup.kibana: {% if beats_metricbeat_output == "elasticsearch" %} output.elasticsearch: -{% if elasticsearch_http_security | bool %} +{% if beats_security | bool %} {% if elasticstack_full_stack | bool %} hosts: [ {% for host in groups['elasticsearch'] %}"https://{{ host }}:{{ elasticstack_elasticsearch_http_port }}"{% if not loop.last %},{% endif %}{% endfor %}] {% else %}