Merge pull request #2167 from ceph/bz-1510906

defaults: fix rgw restart script in handlers
pull/2170/head
Sébastien Han 2017-11-14 03:37:37 +11:00 committed by GitHub
commit 5cdbb08d00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -16,9 +16,9 @@ RGW_IP=[{{ hostvars[inventory_hostname]['ansible_all_' + ip_version + '_addresse
{% endif %}
{% elif radosgw_address_block is defined and radosgw_address_block != 'subnet' -%}
{% if ip_version == 'ipv4' %}
RGW_IP={{ ['ansible_all_' + ip_version + '_addresses'] | ipaddr(radosgw_address_block) | first }} \
RGW_IP={{ hostvars[inventory_hostname]['ansible_all_' + ip_version + '_addresses'] | ipaddr(radosgw_address_block) | first }} \
{% elif ip_version == 'ipv6' %}
RGW_IP=[{{ ['ansible_all_' + ip_version + '_addresses'] | ipaddr(radosgw_address_block) | first }}] \
RGW_IP=[{{ hostvars[inventory_hostname]['ansible_all_' + ip_version + '_addresses'] | ipaddr(radosgw_address_block) | first }}] \
{% endif %}
{% elif hostvars[inventory_hostname]['radosgw_address'] is defined and hostvars[inventory_hostname]['radosgw_address'] != 'address' -%}
{% if ip_version == 'ipv4' %}
@ -42,9 +42,9 @@ RGW_IP=[{{ hostvars[inventory_hostname][interface][ip_version][0]['address'] }}]
{% else %}
{% set interface = 'ansible_' + radosgw_interface %}
{% if ip_version == 'ipv4' %}
RGW_IP={{ [interface][ip_version]['address'] }} \
RGW_IP={{ hostvars[inventory_hostname][interface][ip_version]['address'] }} \
{% elif ip_version == 'ipv6' %}
RGW_IP=[{{ [interface][ip_version][0]['address'] }}] \
RGW_IP=[{{ hostvars[inventory_hostname][interface][ip_version][0]['address'] }}] \
{% endif %}
{% endif %}