diff --git a/group_vars/all.yml.sample b/group_vars/all.yml.sample index 348698ff5..14400b3f0 100644 --- a/group_vars/all.yml.sample +++ b/group_vars/all.yml.sample @@ -768,6 +768,8 @@ dummy: # We only need this for SSL (https) connections #grafana_crt: '' #grafana_key: '' +# When using https, please fill with a hostname for which grafana_crt is valid. +#grafana_server_fqdn: '' #grafana_container_image: "docker.io/grafana/grafana:5.4.3" #grafana_container_cpu_period: 100000 #grafana_container_cpu_cores: 2 diff --git a/group_vars/rhcs.yml.sample b/group_vars/rhcs.yml.sample index b0dea2e6b..90a79642c 100644 --- a/group_vars/rhcs.yml.sample +++ b/group_vars/rhcs.yml.sample @@ -768,6 +768,8 @@ node_exporter_container_image: registry.redhat.io/openshift4/ose-prometheus-node # We only need this for SSL (https) connections #grafana_crt: '' #grafana_key: '' +# When using https, please fill with a hostname for which grafana_crt is valid. +#grafana_server_fqdn: '' grafana_container_image: registry.redhat.io/rhceph/rhceph-4-dashboard-rhel8:4 #grafana_container_cpu_period: 100000 #grafana_container_cpu_cores: 2 diff --git a/roles/ceph-dashboard/tasks/configure_grafana_layouts.yml b/roles/ceph-dashboard/tasks/configure_grafana_layouts.yml index 00e8eaacd..556c5870c 100644 --- a/roles/ceph-dashboard/tasks/configure_grafana_layouts.yml +++ b/roles/ceph-dashboard/tasks/configure_grafana_layouts.yml @@ -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 diff --git a/roles/ceph-defaults/defaults/main.yml b/roles/ceph-defaults/defaults/main.yml index 6e4570008..744c678ae 100644 --- a/roles/ceph-defaults/defaults/main.yml +++ b/roles/ceph-defaults/defaults/main.yml @@ -760,6 +760,8 @@ grafana_admin_user: admin # We only need this for SSL (https) connections grafana_crt: '' grafana_key: '' +# When using https, please fill with a hostname for which grafana_crt is valid. +grafana_server_fqdn: '' grafana_container_image: "docker.io/grafana/grafana:5.4.3" grafana_container_cpu_period: 100000 grafana_container_cpu_cores: 2