{% if not containerized_deployment and not containerized_deployment_with_kv -%}
mon host = {% for host in groups[mon_group_name] -%}
- {% if monitor_address_block is defined %}
+ {% if monitor_address_block | length > 0 %}
{% if ip_version == 'ipv4' -%}
{{ hostvars[host]['ansible_all_' + ip_version + '_addresses'] | ipaddr(monitor_address_block) | first }}
{%- elif ip_version == 'ipv6' -%}
{% if containerized_deployment %}
fsid = {{ fsid }}
mon host = {% for host in groups[mon_group_name] -%}
- {% if monitor_address_block is defined %}
+ {% if monitor_address_block | length > 0 %}
{% if ip_version == 'ipv4' -%}
{{ hostvars[host]['ansible_all_' + ip_version + '_addresses'] | ipaddr(monitor_address_block) | first }}
{%- elif ip_version == 'ipv6' -%}