31 lines
676 B
YAML
31 lines
676 B
YAML
|
---
|
||
|
- 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
|