Skip to content

feat(roles/grafana): Add JWT support#207

Open
danyalberchtoldlf wants to merge 5 commits intomainfrom
feat/grafana-jwt
Open

feat(roles/grafana): Add JWT support#207
danyalberchtoldlf wants to merge 5 commits intomainfrom
feat/grafana-jwt

Conversation

@danyalberchtoldlf
Copy link
Copy Markdown
Contributor

No description provided.

grafana__bitwarden_collection_id: '{{ lfops__bitwarden_collection_id | default() }}'
grafana__bitwarden_organization_id: '{{ lfops__bitwarden_organization_id | default() }}'
grafana__cookie_samesite: 'lax'
grafana__auth_jwt: false
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please sort alphabetically

# Enable or disable loading other base map layers
;enable_custom_baselayers = true

{% if grafana__auth_jwt %}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this section normally in the OS's grafana.ini? if yes, then remove the if-statement and just set enabled to grafana__auth_jwt. would make comparing rpmnews easier

owner: 'apache'
group: 'icingaweb2'
mode: '0640'
when: icingaweb2_module_grafana__auth_jwt
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
when: icingaweb2_module_grafana__auth_jwt
when: 'icingaweb2_module_grafana__auth_jwt'

same below

type: 'RSA'
owner: 'apache'
group: 'icingaweb2'
mode: '0640'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
mode: '0640'
mode: 0o640

mode: '0644'
when: icingaweb2_module_grafana__auth_jwt

- name: 'restart grafana'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could this be a handler?

{% if icingaweb2_module_grafana__auth_jwt %}
jwtEnable = "1"
jwtUser = "grafana-admin"
jwtIssuer = "https://{{ (icingaweb2_module_grafana__url | split('://'))[1] }}"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you use https://docs.ansible.com/projects/ansible/latest/collections/ansible/builtin/urlsplit_filter.html instead? in any case, use the FQCN for the filter

@danyalberchtoldlf danyalberchtoldlf marked this pull request as draft March 27, 2026 15:01
@danyalberchtoldlf danyalberchtoldlf marked this pull request as ready for review March 27, 2026 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants