]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
mgr/dashboard: Fix grafana/prometheus url config
authorDimitri Savineau <dsavinea@redhat.com>
Fri, 2 Aug 2019 17:35:22 +0000 (13:35 -0400)
committerGuillaume Abrioux <gabrioux@redhat.com>
Thu, 8 Aug 2019 11:47:09 +0000 (13:47 +0200)
When configuring grafana/prometheus embed in the mgr/dashboard, we need
to use the address of the grafana-server node and not the current
hostname because mgr/dashboard and grafana/prometheus could be present
on different hosts.
We should instead rely on the grafana_server_addr variable and remove
the dashboard_url.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 4c6ec1dccb994dbd25ec22919f4964bb9b9db8f5)

group_vars/all.yml.sample
group_vars/rhcs.yml.sample
roles/ceph-dashboard/tasks/configure_dashboard.yml
roles/ceph-defaults/defaults/main.yml

index df680253ec62682da85fe01a65198612dc703475..ab26caa9ef37eabdb21f41b467faf037b217d7e8 100644 (file)
@@ -704,7 +704,6 @@ dummy:
 # Choose http or https
 # For https, you should set dashboard.crt/key and grafana.crt/key
 #dashboard_protocol: http
-#dashboard_url: "{{ ansible_hostname }}"
 #dashboard_port: 8443
 #dashboard_admin_user: admin
 #dashboard_admin_password: admin
index 893ec3d5ef1ca0369eaaf5ebac5a5f2648efcbf6..2442a5335ede9010cd1cc40c5bb7d232ac3663d6 100644 (file)
@@ -704,7 +704,6 @@ ceph_docker_registry: "registry.access.redhat.com"
 # Choose http or https
 # For https, you should set dashboard.crt/key and grafana.crt/key
 #dashboard_protocol: http
-#dashboard_url: "{{ ansible_hostname }}"
 #dashboard_port: 8443
 #dashboard_admin_user: admin
 #dashboard_admin_password: admin
index d5a112a2fcafdcd16ed51cc45804303cdadb0605..28ce815f79c77bd84d431fe82a29249d52da17a3 100644 (file)
   until: ac_result.rc == 0
 
 - name: set grafana url
-  command: "{{ container_exec_cmd }} ceph dashboard set-grafana-api-url {{ dashboard_protocol }}://{{ dashboard_url }}:{{ grafana_port }}/"
+  command: "{{ container_exec_cmd }} ceph dashboard set-grafana-api-url {{ dashboard_protocol }}://{{ grafana_server_addr }}:{{ grafana_port }}/"
   delegate_to: "{{ groups[mon_group_name][0] }}"
   run_once: true
   changed_when: false
 
 - name: set alertmanager host
-  command: "{{ container_exec_cmd }} ceph dashboard set-alertmanager-api-host {{ dashboard_protocol }}://{{ dashboard_url }}:{{ alertmanager_port }}/"
+  command: "{{ container_exec_cmd }} ceph dashboard set-alertmanager-api-host {{ dashboard_protocol }}://{{ grafana_server_addr }}:{{ alertmanager_port }}/"
   delegate_to: "{{ groups[mon_group_name][0] }}"
   run_once: true
   changed_when: false
index d350ca3940411a4c1de8e1e1907bb0cd93a2dd3f..e72d072713344075715b2bb8dbcb23f9b541376e 100644 (file)
@@ -696,7 +696,6 @@ dashboard_enabled: True
 # Choose http or https
 # For https, you should set dashboard.crt/key and grafana.crt/key
 dashboard_protocol: http
-dashboard_url: "{{ ansible_hostname }}"
 dashboard_port: 8443
 dashboard_admin_user: admin
 dashboard_admin_password: admin