diff options
Diffstat (limited to 'roles/monitoring/grafana')
-rw-r--r-- | roles/monitoring/grafana/defaults/main.yml | 1 | ||||
-rw-r--r-- | roles/monitoring/grafana/tasks/main.yml | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/roles/monitoring/grafana/defaults/main.yml b/roles/monitoring/grafana/defaults/main.yml index 7141d488..0118b8cb 100644 --- a/roles/monitoring/grafana/defaults/main.yml +++ b/roles/monitoring/grafana/defaults/main.yml @@ -21,3 +21,4 @@ grafana_config_users: allow_org_create: false grafana_config_smtp: {} +grafana_config_plugins: {} diff --git a/roles/monitoring/grafana/tasks/main.yml b/roles/monitoring/grafana/tasks/main.yml index 0cf968f1..55cce412 100644 --- a/roles/monitoring/grafana/tasks/main.yml +++ b/roles/monitoring/grafana/tasks/main.yml @@ -63,6 +63,17 @@ value: "{{ item.value | string }}" notify: restart grafana +- name: configure grafana plugins + loop: "{{ grafana_config_plugins | dict2items }}" + loop_control: + label: "{{ item.key }}" + ini_file: + path: /etc/grafana/grafana.ini + section: plugins + option: "{{ item.key }}" + value: "{{ item.value | string }}" + notify: restart grafana + - name: make sure grafan-server is enabled and started systemd: name: grafana-server |