aboutsummaryrefslogtreecommitdiff
path: root/ansible
diff options
context:
space:
mode:
authorAlex Welsh <alex@stackhpc.com>2026-09-02 09:22:39 +0100
committerBartosz Bezak <bartosz@stackhpc.com>2026-09-03 07:41:03 +0000
commit0848902bef126de880448977307fe7d6bcc9a5d4 (patch)
tree39c366f63b9db072dee6e8280ed7c028eec8757c /ansible
parent2a76a1f0b98de0ed035224f6cdd02edee99d2dfc (diff)
downloadkolla-ansible-0848902bef126de880448977307fe7d6bcc9a5d4.tar.gz
kolla-ansible-0848902bef126de880448977307fe7d6bcc9a5d4.zip
Remove Disable Getting Started panel Grafana tasks
Since Grafana 13.2, the api/user/helpflags/1 endpoint has been removed [1]. This means the "Disable Getting Started panel" deployment task fails with 404 when a custom home dashboard is added. The best alternative I can find is to set default_home_dashboard_path in grafana.ini, which disables the panel anyway [2] [1] https://github.com/grafana/grafana/pull/124916 [2] https://github.com/grafana/grafana/pull/28750 Change-Id: I78b8657b6ca94d81e3becbba9d5a476d9427658f Signed-off-by: Alex Welsh <alex@stackhpc.com> Closes-Bug: #2166048 (cherry picked from commit c8e7b85b2707f762b2560ad8bed9d107a30ff521)
Diffstat (limited to 'ansible')
-rw-r--r--ansible/roles/grafana/defaults/main.yml5
-rw-r--r--ansible/roles/grafana/tasks/post_config.yml17
-rw-r--r--ansible/roles/grafana/templates/grafana.ini.j25
3 files changed, 10 insertions, 17 deletions
diff --git a/ansible/roles/grafana/defaults/main.yml b/ansible/roles/grafana/defaults/main.yml
index e7aac005a..402519d78 100644
--- a/ansible/roles/grafana/defaults/main.yml
+++ b/ansible/roles/grafana/defaults/main.yml
@@ -122,6 +122,11 @@ grafana_start_first_node_retries: 12
grafana_remove_old_volume: true
+grafana_custom_home_dashboard: >-
+ {{ 'grafana_home_dashboard.json' in
+ check_extra_conf_grafana.files | default([], true) |
+ map(attribute='path') | map('basename') }}
+
############
# Prometheus
############
diff --git a/ansible/roles/grafana/tasks/post_config.yml b/ansible/roles/grafana/tasks/post_config.yml
index e90a2ab47..949ef31f6 100644
--- a/ansible/roles/grafana/tasks/post_config.yml
+++ b/ansible/roles/grafana/tasks/post_config.yml
@@ -41,20 +41,3 @@
failed_when: response.status not in [200, 409] or response.status == 409 and ("name already exists" not in response.json.message | default(""))
with_dict: "{{ grafana_data_sources }}"
when: item.value.enabled | bool
-
-- name: Disable Getting Started panel
- become: true
- kolla_toolbox:
- container_engine: "{{ kolla_container_engine }}"
- module_name: uri
- module_args:
- url: "{{ grafana_internal_endpoint }}/api/user/helpflags/1"
- method: PUT
- user: "{{ grafana_admin_username }}"
- password: "{{ grafana_admin_password }}"
- force_basic_auth: true
- status_code: 200
- register: grafana_response
- changed_when: grafana_response.status == 200
- run_once: true
- when: "'grafana_home_dashboard.json' in check_extra_conf_grafana.files | map(attribute='path') | map('basename')"
diff --git a/ansible/roles/grafana/templates/grafana.ini.j2 b/ansible/roles/grafana/templates/grafana.ini.j2
index 763915796..4aae4caa5 100644
--- a/ansible/roles/grafana/templates/grafana.ini.j2
+++ b/ansible/roles/grafana/templates/grafana.ini.j2
@@ -41,3 +41,8 @@ enabled = true
config_file = /etc/grafana/ldap.toml
allow_sign_up = true
{% endif %}
+
+{% if grafana_custom_home_dashboard | bool %}
+[dashboards]
+default_home_dashboard_path = /usr/share/grafana/public/dashboards/home.json
+{% endif %}