diff --git a/roles/beats/templates/auditbeat.yml.j2 b/roles/beats/templates/auditbeat.yml.j2 index 3cf82f22..85a085b8 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[elasticstack_elasticsearch_group_name] %}"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 138eecf7..a8d45b04 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[elasticstack_elasticsearch_group_name] %}"https://{{ host }}:{{ elasticstack_elasticsearch_http_port }}"{% if not loop.last %},{% endif %}{% endfor %}] {% else %}