Option to auto assign a default role.

This commit is contained in:
Andrea Dell'Amico 2024-01-10 18:58:12 +01:00
parent 1eb68fdd6a
commit 9025f7fb20
Signed by: andrea.dellamico
GPG Key ID: 147ABE6CEB9E20FF
1 changed files with 7 additions and 2 deletions

View File

@ -10,6 +10,8 @@ grafana_pkg_state: present
grafana_packages:
- grafana
grafana_oauth_auto_assign_role: false
grafana_role_attribute_strict: "{% if grafana_oauth_auto_assign_role %}false{% else %}true{% endif %}"
grafana_conf:
- { section: "", option: app_mode, value: "{{ grafana_app_mode }}", state: present }
- { section: "", option: instance_name, value: "{{ grafana_instance_name }}", state: present }
@ -70,7 +72,11 @@ grafana_conf:
option: auto_assign_org
value: "{{ grafana_u_auto_assign_org | default(true) | lower }}"
state: present
- { section: users, option: auto_assign_org_role, value: "{{grafana_u_default_role | lower }}", state: present }
- { section: users, option: auto_assign_org_role, value: "{{ grafana_u_default_role | lower }}", state: "{% if grafana_oauth_auto_assign_role %}present{% else %}absent{% endif %}" }
- section: users
option: role_attribute_strict
value: "{{ grafana_role_attribute_strict }}"
state: "present"
- { section: users, option: default_theme, value: "{{ grafana_u_default_theme }}", state: present }
- { section: auth, option: disable_login_form, value: "{{ grafana_u_disable_login_form | lower }}", state: present }
- { section: auth, option: oauth_auto_login, value: "{{ grafana_oauth_auto_login | lower }}", state: present }
@ -170,7 +176,6 @@ grafana_conf:
- { section: remote_cache, option: type, value: "{{ grafana_remote_cache }}", state: present }
- { section: remote_cache, option: connstr, value: "{{ grafana_remote_cache_connstr }}", state: present }
grafana_additional_conf: []
grafana_ldap_conf_file:
- ldap.toml