From 0d99a03fb3b97ffd3473fc4a8613e4de42b86981 Mon Sep 17 00:00:00 2001 From: Thomas Widhalm Date: Wed, 22 Jan 2025 16:43:37 +0100 Subject: [PATCH] Fix YAML multiline config for package names * Use '>-' instead of '>' for YAML multline when creating package names. The extra newline at the end of the string can cause JSON parsing errors as reported by @cbeaujoin-stellar . This change will strip the newline character after the name fixes #357 --- roles/beats/tasks/auditbeat.yml | 2 +- roles/beats/tasks/filebeat.yml | 2 +- roles/beats/tasks/metricbeat.yml | 2 +- roles/kibana/tasks/main.yml | 2 +- roles/logstash/tasks/main.yml | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/roles/beats/tasks/auditbeat.yml b/roles/beats/tasks/auditbeat.yml index 5a42f385..773382ff 100644 --- a/roles/beats/tasks/auditbeat.yml +++ b/roles/beats/tasks/auditbeat.yml @@ -2,7 +2,7 @@ - name: Construct exact name of Auditbeat package ansible.builtin.set_fact: - beats_auditbeat_package: > + beats_auditbeat_package: >- {{ 'auditbeat' + (elasticstack_versionseparator + diff --git a/roles/beats/tasks/filebeat.yml b/roles/beats/tasks/filebeat.yml index 4c90c9ed..6240b09a 100644 --- a/roles/beats/tasks/filebeat.yml +++ b/roles/beats/tasks/filebeat.yml @@ -2,7 +2,7 @@ - name: Construct exact name of Filebeat package ansible.builtin.set_fact: - beats_filebeat_package: > + beats_filebeat_package: >- {{ 'filebeat' + (elasticstack_versionseparator + diff --git a/roles/beats/tasks/metricbeat.yml b/roles/beats/tasks/metricbeat.yml index c261a962..d89cb760 100644 --- a/roles/beats/tasks/metricbeat.yml +++ b/roles/beats/tasks/metricbeat.yml @@ -2,7 +2,7 @@ - name: Construct exact name of Metricbeat package ansible.builtin.set_fact: - beats_metricbeat_package: > + beats_metricbeat_package: >- {{ 'metricbeat' + (elasticstack_versionseparator + diff --git a/roles/kibana/tasks/main.yml b/roles/kibana/tasks/main.yml index f33f3deb..774db05e 100644 --- a/roles/kibana/tasks/main.yml +++ b/roles/kibana/tasks/main.yml @@ -41,7 +41,7 @@ - name: Construct exact name of Kibana package ansible.builtin.set_fact: - kibana_package: > + kibana_package: >- {{ 'kibana' + ('-oss' if elasticstack_variant == 'oss' else '') + diff --git a/roles/logstash/tasks/main.yml b/roles/logstash/tasks/main.yml index 00e4a70a..2efcca09 100644 --- a/roles/logstash/tasks/main.yml +++ b/roles/logstash/tasks/main.yml @@ -58,7 +58,7 @@ - name: Construct exact name of Logstash package ansible.builtin.set_fact: - logstash_package: > + logstash_package: >- {{ 'logstash' + ('-oss' if elasticstack_variant == 'oss' else '') + @@ -72,7 +72,7 @@ - name: Construct exact name of Logstash package ansible.builtin.set_fact: - logstash_package: > + logstash_package: >- {{ 'logstash' + ('-oss' if elasticstack_variant == 'oss' else '') +