From 58f664fd17fe744da121c1ad76badab4ccf2887b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Fri, 1 Sep 2017 19:02:48 +0200 Subject: [PATCH] ceph-rgw: fix systemd unit layout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sébastien Han --- .../ceph-rgw/templates/ceph-radosgw.service.j2 | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/roles/ceph-rgw/templates/ceph-radosgw.service.j2 b/roles/ceph-rgw/templates/ceph-radosgw.service.j2 index daaaf6600..afe7c72c6 100644 --- a/roles/ceph-rgw/templates/ceph-radosgw.service.j2 +++ b/roles/ceph-rgw/templates/ceph-radosgw.service.j2 @@ -18,23 +18,24 @@ ExecStart=/usr/bin/docker run --rm --net=host \ {% if radosgw_address_block | length > 0 %} {% if ip_version == 'ipv4' -%} -e RGW_CIVETWEB_IP={{ hostvars[inventory_hostname]['ansible_all_' + ip_version + '_addresses'] | ipaddr(radosgw_address_block) | first }} \ - {%- elif ip_version == 'ipv6' -%} + {% elif ip_version == 'ipv6' -%} -e RGW_CIVETWEB_IP=[{{ hostvars[inventory_hostname]['ansible_all_' + ip_version + '_addresses'] | ipaddr(radosgw_address_block) | first }}] \ - {%- endif %} + {% endif -%} {% elif hostvars[inventory_hostname]['radosgw_address'] is defined and hostvars[inventory_hostname]['radosgw_address'] != '0.0.0.0' -%} {% if ip_version == 'ipv4' -%} -e RGW_CIVETWEB_IP={{ hostvars[inventory_hostname]['radosgw_address'] }} \ - {%- elif ip_version == 'ipv6' -%} + {% elif ip_version == 'ipv6' -%} -e RGW_CIVETWEB_IP=[{{ hostvars[inventory_hostname]['radosgw_address'] }}] \ - {% endif %} - {%- else -%} + {% endif -%} + {% else -%} {% set interface = ["ansible_",radosgw_interface]|join %} {% if ip_version == 'ipv6' -%} -e RGW_CIVETWEB_IP=[{{ hostvars[inventory_hostname][interface][ip_version][0]['address'] }}] \ - {%- elif ip_version == 'ipv4' -%} + {% elif ip_version == 'ipv4' -%} -e RGW_CIVETWEB_IP={{ hostvars[inventory_hostname][interface][ip_version]['address'] }} \ - {% endif %} - {%- endif %} + {% endif -%} + {% endif -%} + -v /etc/localtime:/etc/localtime:ro \ -e CEPH_DAEMON=RGW \ -e CLUSTER={{ cluster }} \