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>
# 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
# 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
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
# 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