ansible-debops-infrastructure

DebOps and Ansible scripts to manage my infrastructure
git clone git://git.erethon.com/ansible-debops-infrastructure
Log | Files | Refs

commit 5272d615bc21b1ee23606cc13d808d40e79409d1
parent 69fc93230176850bee03854f1d5ac4495be52d1a
Author: Dionysis Grigoropoulos <dgrig@erethon.com>
Date:   Mon,  6 May 2019 02:47:41 +0300

grafana: Init role to configure grafana

Diffstat:
ansible/roles/grafana/defaults/main.yml | 18++++++++++++++++++
ansible/roles/grafana/tasks/main.yml | 16++++++++++++++++
2 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/ansible/roles/grafana/defaults/main.yml b/ansible/roles/grafana/defaults/main.yml @@ -0,0 +1,18 @@ +--- + +grafana__settings: + - section: analytics + option: reporting_enabled + value: false + - section: analytics + option: check_for_updates + value: false + - section: security + option: disable_gravatar + value: true + - section: users + option: allow_sign_up + value: false + - section: explore + option: enabled + value: false diff --git a/ansible/roles/grafana/tasks/main.yml b/ansible/roles/grafana/tasks/main.yml @@ -0,0 +1,16 @@ +--- + +- name: Configure Grafana + ini_file: + path: /etc/grafana/grafana.ini + backup: yes + section: "{{ item.section }}" + option: "{{ item.option }}" + value: "{{ item.value }}" + loop: "{{ grafana__settings }}" + +- name: Enable and restart Grafana service + systemd: + name: grafana-server + enabled: yes + state: restarted