paulbsd-salt/states/telegraf/service.sls
Paul Lecuq 2931ebd8bf
Some checks failed
continuous-integration/drone/push Build is failing
updated telegraf state
2024-03-20 14:32:46 +01:00

19 lines
481 B
Plaintext

---
{%- from "telegraf/map.jinja" import telegraf with context %}
telegraf-service-file:
file.managed:
- name: /etc/systemd/system/telegraf@.service
- source: salt://telegraf/templates/telegraf.service.j2
- user: root
- group: root
- template: jinja
- watch_in:
- service: telegraf-service
{% for cfg, value in telegraf.config.items() %}
telegraf-{{ cfg }}-service:
service.running:
- name: telegraf@{{ cfg }}
- enable: true
{% endfor %}