Louis Vallat 83da79bf82
feat: added telegraf configuration deployment using template
Signed-off-by: Louis Vallat <contact@louis-vallat.dev>
2025-01-08 11:30:36 +01:00

18 lines
378 B
YAML

---
- name: Add telegraf to docker group
ansible.builtin.user:
name: telegraf
groups: docker
append: true
when: "docker is defined and docker == 'true'"
notify:
- Restart telegraf
- name: Deploy configuration file
ansible.builtin.template:
src: telegraf.conf.j2
dest: /etc/telegraf/telegraf.conf
mode: "644"
notify:
- Restart telegraf