]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Allow user to specify grafana_server_fqdn
authorPaulo Matias <matias@ufscar.br>
Tue, 17 Mar 2020 02:40:20 +0000 (23:40 -0300)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Thu, 6 Aug 2020 15:29:25 +0000 (11:29 -0400)
This is needed to get a TLS certificate to validate correctly.

If unspecified, auto-detected grafana_server_addr is used.

Signed-off-by: Paulo Matias <matias@ufscar.br>
(cherry picked from commit 38ce02c2eacee20395b4d7ad6fc5b7b2c4470a30)

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

index 39e75e239b927781ef41b86755bbbf322774c4b9..1fa164d31a14655d9a6b53faa714c4f2dbe05cdc 100644 (file)
@@ -762,6 +762,8 @@ dummy:
 #grafana_crt: ''
 #grafana_key: ''
 #grafana_container_image: "grafana/grafana:5.4.3"
+# When using https, please fill with a hostname for which grafana_crt is valid.
+#grafana_server_fqdn: ''
 #grafana_container_cpu_period: 100000
 #grafana_container_cpu_cores: 2
 # container_memory is in GB
index c6231cab9ffc2ac8749d2a17175c74fc8be534be..6c09dda994349bc282b9a1d089b123da1cf3e142 100644 (file)
@@ -762,6 +762,8 @@ node_exporter_container_image: registry.redhat.io/openshift4/ose-prometheus-node
 #grafana_crt: ''
 #grafana_key: ''
 grafana_container_image: registry.redhat.io/rhceph/rhceph-4-dashboard-rhel8:4
+# When using https, please fill with a hostname for which grafana_crt is valid.
+#grafana_server_fqdn: ''
 #grafana_container_cpu_period: 100000
 #grafana_container_cpu_cores: 2
 # container_memory is in GB
index 00e8eaacd661d760cfa0cf8930c38065b26909bf..556c5870c0cafd7018eea3521e21fa72bd6a45b2 100644 (file)
@@ -1,6 +1,6 @@
 ---
 - name: set grafana url
-  command: "{{ container_exec_cmd }} ceph --cluster {{ cluster }} dashboard set-grafana-api-url {{ dashboard_protocol }}://{{ grafana_server_addr }}:{{ grafana_port }}"
+  command: "{{ container_exec_cmd }} ceph --cluster {{ cluster }} dashboard set-grafana-api-url {{ dashboard_protocol }}://{{ grafana_server_fqdn | default(grafana_server_addr, true) }}:{{ grafana_port }}"
   delegate_to: "{{ groups[mon_group_name][0] }}"
   run_once: true
   changed_when: false
index 680ccc7a9bb0260147eb028a0b4e0f6f9ee0b506..ad753300dc09a246c3205186d10e144bb6a0eff0 100644 (file)
@@ -754,6 +754,8 @@ grafana_admin_user: admin
 grafana_crt: ''
 grafana_key: ''
 grafana_container_image: "grafana/grafana:5.4.3"
+# When using https, please fill with a hostname for which grafana_crt is valid.
+grafana_server_fqdn: ''
 grafana_container_cpu_period: 100000
 grafana_container_cpu_cores: 2
 # container_memory is in GB