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)
{{ 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
{{ 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