]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
dashboard: use fqdn in external url
authorGuillaume Abrioux <gabrioux@redhat.com>
Thu, 2 Jan 2020 17:09:38 +0000 (18:09 +0100)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Wed, 8 Jan 2020 21:14:33 +0000 (16:14 -0500)
Force fqdn to be used in external url for prometheus and alertmanager.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1765485
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 498bc45859f9a7ac4b3ac419e21852164f8a762e)

roles/ceph-prometheus/templates/alertmanager.service.j2
roles/ceph-prometheus/templates/prometheus.service.j2

index 6e3b33eb350832d672ef8553d19c0b8b89b2b7df..64b264e0b26c234b1e353a9d54bd5096eee97508 100644 (file)
@@ -23,6 +23,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --name=alertmanager \
   {{ alertmanager_container_image }} \
   --config.file=/etc/alertmanager/alertmanager.yml \
   --storage.path=/alertmanager \
+  --web.external-url=http://{{ ansible_fqdn }}:{{ alertmanager_port }}/ \
   --web.listen-address=:{{ alertmanager_port }}
 ExecStop=/usr/bin/{{ container_binary }} stop alertmanager
 Restart=always
index 91909081504c0150ca3fc1e3be6c8d62c5282ab3..bbaed8829726705b23d5466764050e54d3c193b9 100644 (file)
@@ -23,7 +23,7 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --name=prometheus \
   {{ prometheus_container_image }} \
   --config.file=/etc/prometheus/prometheus.yml \
   --storage.tsdb.path=/prometheus \
-  --web.external-url=http://{{ inventory_hostname }}:{{ prometheus_port }}/ \
+  --web.external-url=http://{{ ansible_fqdn }}:{{ prometheus_port }}/ \
   --web.listen-address=:{{ prometheus_port }}
 ExecStop=/usr/bin/{{ container_binary }} stop prometheus
 Restart=always