diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2022-04-04 21:24:22 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2022-04-04 21:24:22 +0200 |
commit | e835ea003eb91a534bfcead68062562e6ed1e665 (patch) | |
tree | 590f4d91c0514377895433f7d68d8b9eef7cf287 /roles/grafana/templates/ldap.toml.j2 | |
parent | 03984cc21f9b2fbc6925a0c29d078fd140240a91 (diff) | |
download | ansible_collection-e835ea003eb91a534bfcead68062562e6ed1e665.tar.gz |
add grafana
Diffstat (limited to 'roles/grafana/templates/ldap.toml.j2')
-rw-r--r-- | roles/grafana/templates/ldap.toml.j2 | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/roles/grafana/templates/ldap.toml.j2 b/roles/grafana/templates/ldap.toml.j2 new file mode 100644 index 0000000..11411ed --- /dev/null +++ b/roles/grafana/templates/ldap.toml.j2 @@ -0,0 +1,33 @@ +# vi: ft=dosini +[[servers]] +host = "{{ grafana.ldap.host }}" +port = {{ grafana.ldap.port }} +use_ssl = {{ grafana.ldap.use_ssl | string | lower }} +start_tls = {{ grafana.ldap.start_tls | string | lower }} +ssl_skip_verify = {{ grafana.ldap.ssl_skip_verify | string | lower }} + +bind_dn = "{{ grafana.ldap.bind_dn }}" +bind_password = """{{ grafana.ldap.bind_pw }}""" + +search_filter = "{{ grafana.ldap.search_filter }}" +search_base_dns = {{ grafana.ldap.base_dns }} + +[servers.attributes] +{% for attr, value in grafana.ldap.attributes.items() %} +{{ attr }} = "{{ value }}" +{% endfor %} + +# Map ldap groups to grafana org roles +{% for i in grafana.ldap.group_mappings %} +[[servers.group_mappings]] +{% for key, value in i.items() %} +{% if value is string %} +{{ key }} = "{{ value }}" +{% elif value is sameas true or value is sameas false %} +{{ key }} = {{ value | string | lower }} +{% else %} +{{ key }} = {{ value }} +{% endif %} +{% endfor %} + +{% endfor %} |