diff --git a/roles/network/templates/nmconnection.j2 b/roles/network/templates/nmconnection.j2 index 867c357..4a27ddb 100644 --- a/roles/network/templates/nmconnection.j2 +++ b/roles/network/templates/nmconnection.j2 @@ -17,7 +17,7 @@ interface-name={{ item.device }} method=auto {% elif item.proto == 'static' %} method=manual -address1={{ item.ipaddr }}/{{ item.netmask }} +address1={{ item.ipaddr }}/{{ (item.ipaddr + '/' + item.netmask) | ansible.utils.ipaddr('prefix') }} {% if item.gateway is defined %} gateway={{ item.gateway }} {% endif %}