Added role influxdb

master
Darks 2 years ago
parent 0603f502e0
commit c30e6af44d
Signed by: Darks
GPG Key ID: F61F10FA138E797C
  1. 30
      roles/influxdb/tasks/main.yml

@ -0,0 +1,30 @@
---
- name: "Install InfluxDB"
pacman:
name: "influxdb"
state: present
- name: "Install python-influxdb"
pacman:
name: "python-influxdb"
state: present
- name: "Create database telegraf"
influxdb_database:
hostname: "localhost"
database_name: "telegraf"
username: "telegraf"
password: "{{ lookup('passwordstore', 'PCv5/telegraf_influxdb') }}"
- name: "Create 30 days retention policy"
influxdb_retention_policy:
hostname: "localhost"
database_name: "telegraf"
policy_name: thirty_days
duration: 30d
replication: 1
- name: "Restart InfluxDB"
service:
name: "influxdb"
state: restarted
Loading…
Cancel
Save