From 763cc2eb514ed7e926ac1beabc2b973d40545000 Mon Sep 17 00:00:00 2001 From: Jeltz Date: Sat, 6 Mar 2021 01:57:08 +0100 Subject: [PATCH] Generate targets_switch_snmp.json --- roles/prometheus/tasks/main.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/roles/prometheus/tasks/main.yml b/roles/prometheus/tasks/main.yml index f215930..a820190 100644 --- a/roles/prometheus/tasks/main.yml +++ b/roles/prometheus/tasks/main.yml @@ -57,6 +57,13 @@ mode: 0644 when: prometheus_unifi_snmp_targets is defined +- name: Configure Prometheus Switchs + copy: + content: "{{ prometheus_switch_snmp_targets | to_nice_json }}" + dest: /etc/prometheus/targets_switch_snmp.json + mode: 0644 + when: prometheus_switch_snmp_targets is defined + - name: Configure Prometheus UPS SNMP devices copy: content: "{{ [{'targets': prometheus_ups_snmp_targets }] | to_nice_json }}\n"