- name: ensure grafana is installed package: name: grafana state: present tags: - install - name: ensure grafana configuration directory exists file: path: /etc/grafana mode: u=rwx,go=rx owner: root group: root state: directory - 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