This role installs and configures Grafana.
Any variables in defaults/main.yml can be redefined in a playbook. There are no mandatory variables, the role will work fine with default settings.
This role installs Grafana with the default configuration (only with some minor security fixes). Usage of custom configuration hasn't been supported yet. If you would like to install the latest beta version, define the grafana_beta variable. If grafana_latest: true the role will update the current version of Grafana on your server or will install the latest version from scratch. If grafana_latest: false, the role will not update the current version of Grafana (if exists on your server), but if there is no Grafana found on the server, it will install the latest version anyway.
We install Grafana from pre-built DEB/RPM packages. All these packages work correctly with sysvinit, upstart and sysvinit. No additional actions required.
None.
In some cases, you should manually install python2 (absent in Ubuntu 16.04). Example playbook:
- hosts: all
become: yes
gather_facts: no
tasks:
- name: install python2
raw: test -e /usr/bin/python || (apt update && apt install -y python-minimal)
changed_when: false
- name: gather facts
setup:
- hosts: all
roles:
- { role: grafana, grafana_beta: no }
All supported platforms are listed in molecule.yml.