servers/roles/grafana/tasks/main.yml

29 lines
807 B
YAML
Raw Permalink Normal View History

2024-09-27 14:14:23 +00:00
- name: Install packages
package:
name: grafana
- name: Configure grafana
ini_file:
path: /etc/grafana.ini
section: '{{ item.section | default("") }}'
option: '{{ item.option }}'
value: '{{ item.value }}'
loop:
- { section: analytics, option: reporting_enabled, value: false }
- { section: analytics, option: check_for_updates, value: false }
- { section: analytics, option: check_for_plugin_updates, value: false }
- { section: news, option: news_feed_enabled, value: false }
- { section: public_dashboards, option: enabled, value: false }
- name: Set up nginx site
template:
dest: '/etc/nginx/http.d/grafana.conf'
src: 'nginx.conf.j2'
notify: reload nginx
- name: Enable grafana
service:
name: grafana
enabled: yes
state: started