Abstract
Ansible role that installs and configures grafana.
grafana role#
Install Grafana on the target hosts, configure a systemd service and export to Prometheus.
Grafana Requirements#
This role has the following requirements.
- A working Python installation. 
- The ability to write to - /etc.
- A system running ArchLinux. 
Grafana Role Variables#
| variable | description | default | 
|---|---|---|
| grafana_db_pass | Password for the database | postgres | 
| grafana_db_type | Type of database ( | postgres | 
| grafana_db_url | URL of the database connection | postgres://grafana:grafana@localhost:5432/grafana | 
| grafana_domain | Domain name of the Grafana instance | grafana.local | 
| grafana_redis_connect | Connection information for Redis | addr=127.0.0.1:6379,pool_size=100,db=0,ssl=false | 
| grafana_trusted_csrf | Accepted request origins | grafana.local localhost | 
Grafana Dependencies#
N/A
Grafana Example Playbook#
This can be run using a playbook similar to the one below.
- hosts: servers
  become: true
  roles:
    - role: grafana
      tags:
        - grafana
      vars:
        x: 42
