Generate targets_switch_snmp.json

This commit is contained in:
jeltz 2021-03-06 01:57:08 +01:00
parent eaa0d2e0fc
commit 763cc2eb51
1 changed files with 7 additions and 0 deletions

View File

@ -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"