roles/grafana: Deploy Grafana

This commit introduces the *grafana* role and the corresponding
`grafana.yml` playbook.  The role installs Grafana using the system
package manager, and configures the server (including LDAP
authentication).
This commit is contained in:
2021-07-02 21:44:06 -05:00
parent 5de8f3e612
commit 5e61e93cea
11 changed files with 1028 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
- name: ensure grafana is installed
package:
name: grafana
state: present
tags:
- install
- name: ensure grafana is configured
template:
src: grafana.ini.j2
dest: /etc/grafana/grafana.ini
owner: root
group: grafana
mode: '0640'
notify: restart grafana
tags:
- config
- name: ensure grafana ldap servers are configured
template:
src: ldap.toml.j2
dest: /etc/grafana/ldap.toml
owner: root
group: grafana
mode: '0640'
notify: restart grafana
tags:
- config
- name: ensure nginx is configured to proxy for grafana
copy:
src: grafana.nginx.conf
dest: /etc/nginx/default.d/grafan.conf
mode: '0644'
notify: reload nginx
tags:
- nginx-config
- meta: flush_handlers
- name: ensure grafana is running
service:
name: grafana-server
state: started