31 lines
No EOL
1.1 KiB
YAML
31 lines
No EOL
1.1 KiB
YAML
---
|
|
- name: Configure Grafana
|
|
hosts: localhost
|
|
tasks:
|
|
- name: create netz39 user
|
|
community.grafana.grafana_user:
|
|
url: "https://{{ hostvars['pottwal.n39.eu']['grafana_domain_name'] }}"
|
|
url_username: admin
|
|
url_password: "{{ hostvars['pottwal.n39.eu']['grafana_admin_password'] }}"
|
|
name: "{{ item.name }}"
|
|
email: "{{ item.email }}"
|
|
login: "{{ item.login }}"
|
|
password: "{{ item.password }}"
|
|
is_admin: true
|
|
state: present
|
|
loop: "{{ grafana_users }}"
|
|
|
|
- name: Create influxdb datasource
|
|
community.grafana.grafana_datasource:
|
|
name: "datasource-influxdb"
|
|
url: "https://{{ hostvars['pottwal.n39.eu']['grafana_domain_name'] }}"
|
|
url_username: admin
|
|
url_password: "{{ hostvars['pottwal.n39.eu']['grafana_admin_password'] }}"
|
|
org_id: "1"
|
|
ds_type: "influxdb"
|
|
ds_url: "https://{{ hostvars['pottwal.n39.eu']['influxdb_domain_name'] }}:8086"
|
|
database: "{{ item.database }}"
|
|
user: "{{ item.user }}"
|
|
password: "{{ item.password }}"
|
|
time_interval: ">10s"
|
|
loop: "{{ grafana_datasources }}" |