Skip to content

Commit 4c6c166

Browse files
authored
Use common variable for TLS (#274)
fixes #248 The `metricbeat.yml` and `auditbeat.yml` templates have code for both connecting to Logstash or Elasticseach. They used different variables to determine whether to turn on TLS or not. That resulted in a missing default and therefore Beats setup breaking when connecting to Elasticseach. I changed the variable that's queried to determine whether to turn on TLS or not. 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.
1 parent e3fcbf0 commit 4c6c166

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

roles/beats/templates/auditbeat.yml.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ setup.template.settings:
3131
setup.kibana:
3232
{% if beats_auditbeat_output == "elasticsearch" %}
3333
output.elasticsearch:
34-
{% if elasticsearch_http_security | bool %}
34+
{% if beats_security | bool %}
3535
{% if elasticstack_full_stack | bool %}
3636
hosts: [ {% for host in groups[elasticstack_elasticsearch_group_name] %}"https://{{ host }}:{{ elasticstack_elasticsearch_http_port }}"{% if not loop.last %},{% endif %}{% endfor %}]
3737
{% else %}

roles/beats/templates/metricbeat.yml.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ setup.template.settings:
88
setup.kibana:
99
{% if beats_metricbeat_output == "elasticsearch" %}
1010
output.elasticsearch:
11-
{% if elasticsearch_http_security | bool %}
11+
{% if beats_security | bool %}
1212
{% if elasticstack_full_stack | bool %}
1313
hosts: [ {% for host in groups[elasticstack_elasticsearch_group_name] %}"https://{{ host }}:{{ elasticstack_elasticsearch_http_port }}"{% if not loop.last %},{% endif %}{% endfor %}]
1414
{% else %}

0 commit comments

Comments
 (0)