ansible-middleware/keycloak

#93 keycloak_jgroups_subnet introduced issue

Closed this issue · 0 comments

hwo-wd commented

The changes introduced via PR #93 around

<interface name="jgroups">
:

        <interface name="jgroups">
{% if keycloak_jgroups_subnet is defined and keycloak_jgroups_subnet | string | length > 0 %}
            <subnet-match value="{{ keycloak_jgroups_subnet | string }}"/>
{% elif ansible_default_ipv4 is defined and (ansible_default_ipv4.network + '/' + ansible_default_ipv4.netmask) | ansible.utils.ipaddr('net') | length > 0 %}
            <subnet-match value="{{ (ansible_default_ipv4.network + '/' + ansible_default_ipv4.netmask) | ansible.utils.ipaddr('net') }}"/>
{% else %}
            <any-address />
{% endif %}
        </interface>

by default:

  • keycloak_jgroups_subnet is defined (=null which is mapped to None on jinja, or sth. similar, but the end result is a string of length 4 with content None)
  • thus the first branch is taken
  • and a <subnet-match value="None"/>