mirror of
https://github.com/FAUSheppy/no-secrets-athq-ansible
synced 2025-12-10 05:28:35 +01:00
feat: collectd/influx role
This commit is contained in:
31
roles/monitoring-influx/tasks/main.yaml
Normal file
31
roles/monitoring-influx/tasks/main.yaml
Normal 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
|
||||
Reference in New Issue
Block a user