Added role influxdb
This commit is contained in:
parent
0603f502e0
commit
c30e6af44d
|
@ -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…
Reference in New Issue