mirror of
https://github.com/FAUSheppy/no-secrets-athq-ansible
synced 2025-12-06 08:41:37 +01:00
46 lines
915 B
YAML
46 lines
915 B
YAML
- name: Copy influx apt keyring
|
|
copy:
|
|
src: influx-repo.gpg
|
|
dest: /usr/share/keyrings/
|
|
mode: 0644
|
|
when: monitoring_master
|
|
|
|
- name: Add influx apt repo
|
|
copy:
|
|
src: influxdb.list
|
|
dest: /etc/apt/sources.list.d/
|
|
mode: 0644
|
|
when: monitoring_master
|
|
|
|
- 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
|