diff options
author | Christian Pointner <equinox@spreadspace.org> | 2023-11-15 19:10:53 +0100 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2023-11-15 19:10:53 +0100 |
commit | 289bc69e05df16245971db252668b7ba55ee3500 (patch) | |
tree | 3a667ebe7f8d1468cf2e7da8a1a4e9adacf98f40 /roles/monitoring/grafana | |
parent | ch-mon: add certificate for monitoring (diff) |
ch-mon: monitoring services and landingpage now use new sso
Diffstat (limited to 'roles/monitoring/grafana')
-rw-r--r-- | roles/monitoring/grafana/defaults/main.yml | 7 | ||||
-rw-r--r-- | roles/monitoring/grafana/tasks/main.yml | 22 |
2 files changed, 29 insertions, 0 deletions
diff --git a/roles/monitoring/grafana/defaults/main.yml b/roles/monitoring/grafana/defaults/main.yml index 0eaeb061..20b886ca 100644 --- a/roles/monitoring/grafana/defaults/main.yml +++ b/roles/monitoring/grafana/defaults/main.yml @@ -22,6 +22,13 @@ grafana_config_users: allow_sign_up: false allow_org_create: false +grafana_config_auth: {} +# disable_signout_menu: true + +grafana_config_auth_proxy: {} +# enabled: true +# whitelist: 127.0.0.1 + grafana_datasources: [] # - name: "Prometheus" diff --git a/roles/monitoring/grafana/tasks/main.yml b/roles/monitoring/grafana/tasks/main.yml index 1e21ea39..de2857df 100644 --- a/roles/monitoring/grafana/tasks/main.yml +++ b/roles/monitoring/grafana/tasks/main.yml @@ -68,6 +68,28 @@ value: "{{ item.value | string }}" notify: restart grafana +- name: configure grafana auth + loop: "{{ grafana_config_auth | dict2items }}" + loop_control: + label: "{{ item.key }}" + ini_file: + path: /etc/grafana/grafana.ini + section: auth + option: "{{ item.key }}" + value: "{{ item.value | string }}" + notify: restart grafana + +- name: configure grafana auth.proxy + loop: "{{ grafana_config_auth_proxy | dict2items }}" + loop_control: + label: "{{ item.key }}" + ini_file: + path: /etc/grafana/grafana.ini + section: auth.proxy + option: "{{ item.key }}" + value: "{{ item.value | string }}" + notify: restart grafana + - name: install datasources copy: |