mirror of https://github.com/ceph/ceph-ansible.git
mgr/dashboard: Fix grafana/prometheus url config
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>pull/4315/head
parent
16939eff9e
commit
4c6ec1dccb
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -97,13 +97,13 @@
|
|||
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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue