telegraf: drop agent configuration stuff

Servers will be switched to Prometheus. Telegraf remains as a SNMP proxy
(see following commit).
This commit is contained in:
Timotej Lazar 2025-10-17 21:34:25 +02:00
parent d347fd7215
commit 6600a6fa36
5 changed files with 21 additions and 100 deletions

View file

@ -1,11 +1,22 @@
- name: Get influxdb info
set_fact:
influxdb_info: '{{ lookup("passwordstore", "vm/"~influxdb_host, returnall=true, missing="empty") | from_yaml }}'
- name: Create influxdb token for this host
include_tasks: token.yml
when: 'not ansible_check_mode and "influxdb_token" not in password'
- name: Install telegraf on Debian
include_tasks: debian.yml
- name: Add telegraf package repo on Debian
when: ansible_os_family == "Debian"
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: Enable telegraf service
service:
name: telegraf
enabled: true
state: started