From: Guillaume Abrioux Date: Mon, 15 Oct 2018 13:25:24 +0000 (+0200) Subject: mon: use `_current_monitor_address` in systemd unit file X-Git-Tag: v4.0.0beta1~283 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=74ef7769fbe4f288c512b6c5957973a82f46c8d1;p=ceph-ansible.git 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 --- diff --git a/roles/ceph-mon/templates/ceph-mon.service.j2 b/roles/ceph-mon/templates/ceph-mon.service.j2 index 15c978251..608c0b70f 100644 --- a/roles/ceph-mon/templates/ceph-mon.service.j2 +++ b/roles/ceph-mon/templates/ceph-mon.service.j2 @@ -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(' ', '') }} \