From bc4dc03029d62b818cea0c180c759392c4685d42 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Fri, 31 Dec 2021 14:44:19 +0100 Subject: [PATCH] prometheus: add newline at the end of targets JSON --- roles/prometheus/tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/prometheus/tasks/main.yml b/roles/prometheus/tasks/main.yml index 284fa8b..5d4e7ca 100644 --- a/roles/prometheus/tasks/main.yml +++ b/roles/prometheus/tasks/main.yml @@ -66,21 +66,21 @@ # We don't need to restart Prometheus when updating nodes - name: Configure Prometheus nodes copy: - content: "{{ prometheus_targets | to_nice_json }}" + content: "{{ prometheus_targets | to_nice_json }}\n" dest: /etc/prometheus/targets.json mode: 0644 # We don't need to restart Prometheus when updating nodes - name: Configure Prometheus Ubiquity Unifi SNMP devices copy: - content: "{{ prometheus_unifi_snmp_targets | to_nice_json }}" + content: "{{ prometheus_unifi_snmp_targets | to_nice_json }}\n" dest: /etc/prometheus/targets_unifi_snmp.json mode: 0644 when: prometheus_unifi_snmp_targets is defined - name: Configure Prometheus Switchs copy: - content: "{{ prometheus_switch_snmp_targets | to_nice_json }}" + content: "{{ prometheus_switch_snmp_targets | to_nice_json }}\n" dest: /etc/prometheus/targets_switch_snmp.json mode: 0644 when: prometheus_switch_snmp_targets is defined