[{{ hostvars[host]['monitor_address'] }}]
{%- endif %}
{%- elif hostvars[host]['monitor_interface'] is defined -%}
- {% set interface = 'ansible_' + hostvars[host]['monitor_interface'] %}
+ {% set interface = 'ansible_' + (hostvars[host]['monitor_interface'] | replace('-', '_')) %}
{% if ip_version == 'ipv4' -%}
{{ hostvars[host][interface][ip_version]['address'] }}
{%- elif ip_version == 'ipv6' -%}
[{{ hostvars[host][interface][ip_version][0]['address'] }}]
{%- endif %}
{%- else -%}
- {% set interface = 'ansible_' + monitor_interface %}
+ {% set interface = 'ansible_' + (monitor_interface | replace('-', '_')) %}
{% if ip_version == 'ipv4' -%}
{{ hostvars[host][interface][ip_version]['address'] }}
{%- elif ip_version == 'ipv6' -%}
[{{ hostvars[host]['monitor_address'] }}]
{%- endif %}
{%- elif hostvars[host]['monitor_interface'] is defined -%}
- {% set interface = 'ansible_' + hostvars[host]['monitor_interface'] %}
+ {% set interface = 'ansible_' + (hostvars[host]['monitor_interface'] | replace('-', '_')) %}
{% if ip_version == 'ipv4' -%}
{{ hostvars[host][interface][ip_version]['address'] }}
{%- elif ip_version == 'ipv6' -%}
[{{ hostvars[host][interface][ip_version][0]['address'] }}]
{%- endif %}
{%- else -%}
- {% set interface = 'ansible_' + monitor_interface %}
+ {% set interface = 'ansible_' + (monitor_interface | replace('-', '_')) %}
{% if ip_version == 'ipv4' -%}
{{ hostvars[host][interface][ip_version]['address'] }}
{%- elif ip_version == 'ipv6' -%}
rgw frontends = civetweb port=[{{ radosgw_address }}]:{{ radosgw_civetweb_port }} {{ radosgw_civetweb_options }}
{% endif %}
{% elif hostvars[host]['radosgw_interface'] is defined -%}
- {% set interface='ansible_' + hostvars[host]['radosgw_interface'] %}
+ {% set interface='ansible_' + (hostvars[host]['radosgw_interface'] | replace('-', '_')) %}
{% if ip_version == 'ipv4' %}
rgw frontends = civetweb port={{ hostvars[host][interface][ip_version]['address'] }}:{{ radosgw_civetweb_port }} {{ radosgw_civetweb_options }}
{% elif ip_version == 'ipv6' %}
rgw frontends = civetweb port=[{{ hostvars[host][interface][ip_version][0]['address'] }}]:{{ radosgw_civetweb_port }} {{ radosgw_civetweb_options }}
{% endif %}
{% else %}
- {% set interface='ansible_' + radosgw_interface %}
+ {% set interface='ansible_' + (radosgw_interface | replace('-', '_')) %}
{% if ip_version == 'ipv4' %}
rgw frontends = civetweb port={{ hostvars[host][interface][ip_version]['address'] }}:{{ radosgw_civetweb_port }} {{ radosgw_civetweb_options }}
{% elif ip_version == 'ipv6' %}
RGW_IP=[{{ radosgw_address }}] \
{% endif %}
{% elif hostvars[inventory_hostname]['radosgw_interface'] is defined -%}
- {% set interface = 'ansible_' + hostvars[inventory_hostname]['radosgw_interface'] %}
+ {% set interface = 'ansible_' + (hostvars[inventory_hostname]['radosgw_interface'] | replace('-', '_')) %}
{% if ip_version == 'ipv4' %}
RGW_IP={{ hostvars[inventory_hostname][interface][ip_version]['address'] }} \
{% elif ip_version == 'ipv6' %}
RGW_IP=[{{ hostvars[inventory_hostname][interface][ip_version][0]['address'] }}] \
{% endif %}
{% else %}
- {% set interface = 'ansible_' + radosgw_interface %}
+ {% set interface = 'ansible_' + (radosgw_interface | replace('-', '_')) %}
{% if ip_version == 'ipv4' %}
RGW_IP={{ hostvars[inventory_hostname][interface][ip_version]['address'] }} \
{% elif ip_version == 'ipv6' %}
-e MON_IP=[{{ hostvars[inventory_hostname]['monitor_address'] }}] \
{% endif -%}
{% elif hostvars[inventory_hostname]['monitor_interface'] is defined %}
- {% set interface = 'ansible_' + hostvars[inventory_hostname]['monitor_interface'] %}
+ {% set interface = 'ansible_' + (hostvars[inventory_hostname]['monitor_interface'] | replace('-', '_')) %}
{% if ip_version == 'ipv4' -%}
-e MON_IP={{ hostvars[inventory_hostname][interface][ip_version]['address'] }} \
{% elif ip_version == 'ipv6' -%}
-e MON_IP=[{{ hostvars[inventory_hostname][interface][ip_version][0]['address'] }}] \
{% endif -%}
{% else %}
- {% set interface = 'ansible_' + monitor_interface %}
+ {% set interface = 'ansible_' + (monitor_interface | replace('-', '_')) %}
{% if ip_version == 'ipv4' -%}
-e MON_IP={{ hostvars[inventory_hostname][interface][ip_version]['address'] }} \
{% elif ip_version == 'ipv6' -%}
-e RGW_CIVETWEB_IP=[{{ radosgw_address }}] \
{% endif %}
{% elif hostvars[inventory_hostname]['radosgw_interface'] is defined -%}
- {% set interface = 'ansible_' + hostvars[inventory_hostname]['radosgw_interface'] %}
+ {% set interface = 'ansible_' + (hostvars[inventory_hostname]['radosgw_interface'] | replace('-', '_')) %}
{% if ip_version == 'ipv4' %}
-e RGW_CIVETWEB_IP={{ hostvars[inventory_hostname][interface][ip_version]['address'] }} \
{% elif ip_version == 'ipv6' %}
-e RGW_CIVETWEB_IP=[{{ hostvars[inventory_hostname][interface][ip_version][0]['address'] }}] \
{% endif %}
{% else %}
- {% set interface = 'ansible_' + radosgw_interface %}
+ {% set interface = 'ansible_' + (radosgw_interface | replace('-', '_')) %}
{% if ip_version == 'ipv4' %}
-e RGW_CIVETWEB_IP={{ hostvars[inventory_hostname][interface][ip_version]['address'] }} \
{% elif ip_version == 'ipv6' %}