mirror of https://github.com/ceph/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 <gabrioux@redhat.com>pull/3285/head
parent
073131d8a6
commit
74ef7769fb
|
@ -30,11 +30,7 @@ ExecStart=/usr/bin/docker run --rm --name ceph-mon-%i \
|
||||||
--net=host \
|
--net=host \
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
-e IP_VERSION={{ ip_version[-1:] }} \
|
-e IP_VERSION={{ ip_version[-1:] }} \
|
||||||
{% for host in _monitor_addresses %}
|
-e MON_IP={{ _current_monitor_address }} \
|
||||||
{% if host.name == inventory_hostname %}
|
|
||||||
-e MON_IP={{ host.addr }} \
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
-e CLUSTER={{ cluster }} \
|
-e CLUSTER={{ cluster }} \
|
||||||
-e FSID={{ fsid }} \
|
-e FSID={{ fsid }} \
|
||||||
-e CEPH_PUBLIC_NETWORK={{ public_network | regex_replace(' ', '') }} \
|
-e CEPH_PUBLIC_NETWORK={{ public_network | regex_replace(' ', '') }} \
|
||||||
|
|
Loading…
Reference in New Issue