feat: collectd/influx role

This commit is contained in:
2023-01-03 21:49:28 +01:00
parent 6dd59bb9a2
commit 15a1bcbe9f
6 changed files with 108 additions and 1 deletions

View File

@@ -0,0 +1,31 @@
- name: Install influxdb
apt:
name: influxdb
state: present
when: monitoring_master
- name: Influxdb master server config
template:
src: influxdb.conf.j2
dest: /etc/influxdb/influxdb.conf
when: monitoring_master
notify:
- restart influxdb
- name: Create Influx collectd-db
shell: 'echo "CREATE DATABASE collectd;" | influx'
changed_when: False
when: monitoring_master
- name: Install collectd
apt:
name: collectd
install_recommends: false
state: present
- name: Collectd config
template:
src: collectd.conf.j2
dest: /etc/collectd/collectd.conf
notify:
- restart collectd