From: Zack Cerza Date: Fri, 22 Jun 2018 21:58:16 +0000 (-0600) Subject: ceph-grafana: Set the admin users's home db X-Git-Tag: v2.0~18^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a7d268c7143915aa90c8dea8da94825b76eae3d9;p=cephmetrics.git 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 --- 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