mon: use `_current_monitor_address` in systemd unit file

Let's avoid a jinja loop and use `_current_monitor_address` to get the
monitor address.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
pull/3285/head
Guillaume Abrioux 2018-10-15 15:25:24 +02:00 committed by Sébastien Han
parent 073131d8a6
commit 74ef7769fb
1 changed files with 1 additions and 5 deletions

View File

@ -30,11 +30,7 @@ ExecStart=/usr/bin/docker run --rm --name ceph-mon-%i \
--net=host \
{% endif -%}
-e IP_VERSION={{ ip_version[-1:] }} \
{% for host in _monitor_addresses %}
{% if host.name == inventory_hostname %}
-e MON_IP={{ host.addr }} \
{% endif %}
{% endfor %}
-e MON_IP={{ _current_monitor_address }} \
-e CLUSTER={{ cluster }} \
-e FSID={{ fsid }} \
-e CEPH_PUBLIC_NETWORK={{ public_network | regex_replace(' ', '') }} \