servers/roles/telegraf/tasks/debian.yml
Timotej Lazar 0a0ce7e2a5 Add telegraf role
And enable it for ceph nodes.
2024-11-27 17:37:00 +01:00

32 lines
679 B
YAML

- name: Add influxdb repository
deb822_repository:
name: influxdata
uris: https://repos.influxdata.com/debian
suites: stable
components: main
architectures: amd64
signed_by: https://repos.influxdata.com/influxdata-archive.key
notify: update package cache
- meta: flush_handlers
- name: Install telegraf
package:
name: telegraf
- name: Configure telegraf
when: not ansible_check_mode
template:
dest: /etc/telegraf/telegraf.d/output.conf
src: output.conf.j2
owner: telegraf
group: telegraf
mode: 0640
notify: restart telegraf
- name: Enable telegraf
service:
name: telegraf
enabled: true
state: started