Add telegraf role

And enable it for ceph nodes.
This commit is contained in:
Timotej Lazar 2024-11-27 17:36:20 +01:00
parent 14dd446fd4
commit 0a0ce7e2a5
6 changed files with 111 additions and 0 deletions

View file

@ -0,0 +1,31 @@
- 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