]> git.apps.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>
Tue, 6 Aug 2019 07:34:20 +0000 (09:34 +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>
group_vars/all.yml.sample
group_vars/rhcs.yml.sample
roles/ceph-dashboard/tasks/configure_dashboard.yml
roles/ceph-defaults/defaults/main.yml

index 06b521f3333d179d5d57c82bfb3fcd0d40400008..701c9f3cb65f4e56ea99f4575f1be84f4760f7a8 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 4c1233f024bf2141c5921200259acd0aac9c88ce..f532f615b463e1ff306180715983136108094716 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 1b00994ea0c2790dce0f14cc522ca853ffe01fef..a1e31eaa307150103c321c070d9caa5f5edb1503 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