From a7d268c7143915aa90c8dea8da94825b76eae3d9 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Fri, 22 Jun 2018 15:58:16 -0600 Subject: [PATCH] ceph-grafana: Set the admin users's home db If a human (or API request) changes the home dashboard for the admin account, our method of setting it at the org level will no longer be effective. Let's keep the admin user's home dashboard set to ceph-at-a-glance. Signed-off-by: Zack Cerza --- ansible/roles/ceph-grafana/tasks/push_dashboards.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ansible/roles/ceph-grafana/tasks/push_dashboards.yml b/ansible/roles/ceph-grafana/tasks/push_dashboards.yml index 3282418..a2b5f22 100644 --- a/ansible/roles/ceph-grafana/tasks/push_dashboards.yml +++ b/ansible/roles/ceph-grafana/tasks/push_dashboards.yml @@ -78,9 +78,9 @@ register: dashboard_home no_log: true -- name: Set the home dashboard +- name: Set the org's home dashboard uri: - url: http://localhost:3000/api/org/preferences + url: "http://localhost:3000/api/{{ item }}/preferences" method: PUT user: "{{ grafana.admin_user }}" password: "{{ grafana.admin_password }}" @@ -88,3 +88,6 @@ status_code: 200 body_format: json body: '{"homeDashboardId": {{ dashboard_home.json.dashboard.id }} }' + with_items: + - user + - org -- 2.47.3