diff --git a/roles/kubespray-defaults/defaults/main.yaml b/roles/kubespray-defaults/defaults/main.yaml
index c1da45ecfee05b6de6785b78a292bf948474fe9e..611947595a52ab4b78e7801a6b7328c6f8c366b5 100644
--- a/roles/kubespray-defaults/defaults/main.yaml
+++ b/roles/kubespray-defaults/defaults/main.yaml
@@ -116,8 +116,8 @@ resolvconf_mode: host_resolvconf
 # Deploy netchecker app to verify DNS resolve as an HTTP service
 deploy_netchecker: false
 # Ip address of the kubernetes DNS service (called skydns for historical reasons)
-skydns_server: "{{ kube_service_addresses | ipaddr('net') | ipaddr(3) | ipaddr('address') }}"
-skydns_server_secondary: "{{ kube_service_addresses | ipaddr('net') | ipaddr(4) | ipaddr('address') }}"
+skydns_server: "{{ kube_service_addresses | ansible.utils.ipaddr('net') | ansible.utils.ipaddr(3) | ansible.utils.ipaddr('address') }}"
+skydns_server_secondary: "{{ kube_service_addresses | ansible.utils.ipaddr('net') | ansible.utils.ipaddr(4) | ansible.utils.ipaddr('address') }}"
 dns_domain: "{{ cluster_name }}"
 docker_dns_search_domains:
 - 'default.svc.{{ dns_domain }}'
@@ -232,7 +232,7 @@ kube_network_node_prefix_ipv6: 120
 # listening on.
 # NOTE: loadbalancer_apiserver_localhost somewhat alters the final API enpdoint
 # access IP value (automatically evaluated below)
-kube_apiserver_ip: "{{ kube_service_addresses | ipaddr('net') | ipaddr(1) | ipaddr('address') }}"
+kube_apiserver_ip: "{{ kube_service_addresses | ansible.utils.ipaddr('net') | ansible.utils.ipaddr(1) | ansible.utils.ipaddr('address') }}"
 
 # NOTE: If you specific address/interface and use loadbalancer_apiserver_localhost
 # loadbalancer_apiserver_localhost (nginx/haproxy) will deploy on masters on 127.0.0.1:{{ loadbalancer_apiserver_port | default(kube_apiserver_port) }} too.
diff --git a/roles/network_plugin/macvlan/templates/10-macvlan.conf.j2 b/roles/network_plugin/macvlan/templates/10-macvlan.conf.j2
index 10598a20a78e2475b83850174664ebb858493557..8924547600b9717560ae0a5960465d3726df1f8a 100644
--- a/roles/network_plugin/macvlan/templates/10-macvlan.conf.j2
+++ b/roles/network_plugin/macvlan/templates/10-macvlan.conf.j2
@@ -10,6 +10,6 @@
     "routes": [
       { "dst": "0.0.0.0/0" }
     ],
-    "gateway": "{{ node_pod_cidr|ipaddr('net')|ipaddr(1)|ipaddr('address') }}"
+    "gateway": "{{ node_pod_cidr|ansible.utils.ipaddr('net')|ansible.utils.ipaddr(1)|ansible.utils.ipaddr('address') }}"
   }
 }
diff --git a/roles/network_plugin/macvlan/templates/centos-network-macvlan.cfg.j2 b/roles/network_plugin/macvlan/templates/centos-network-macvlan.cfg.j2
index a7431c8b400503aac7c56e036400b4a073314c9c..1e6c0aab6a3ad0ac6ad339b5696a6af91ad6b316 100644
--- a/roles/network_plugin/macvlan/templates/centos-network-macvlan.cfg.j2
+++ b/roles/network_plugin/macvlan/templates/centos-network-macvlan.cfg.j2
@@ -8,6 +8,6 @@ NM_CONTROLLED=no
 MACVLAN_PARENT={{ macvlan_interface }}
 MACVLAN_MODE=bridge
 
-IPADDR={{ node_pod_cidr|ipaddr('net')|ipaddr(1)|ipaddr('address') }}
-NETMASK={{ node_pod_cidr|ipaddr('netmask') }}
-NETWORK={{ node_pod_cidr|ipaddr('network') }}
+IPADDR={{ node_pod_cidr|ansible.utils.ipaddr('net')|ansible.utils.ipaddr(1)|ansible.utils.ipaddr('address') }}
+NETMASK={{ node_pod_cidr|ansible.utils.ipaddr('netmask') }}
+NETWORK={{ node_pod_cidr|ansible.utils.ipaddr('network') }}
diff --git a/roles/network_plugin/macvlan/templates/centos-postdown-macvlan.cfg.j2 b/roles/network_plugin/macvlan/templates/centos-postdown-macvlan.cfg.j2
index d62ac2e7dc5e32785cfd3ef4405b502b251e678f..87f1f56a39f47ec4ff25e6db4feb74d527028565 100644
--- a/roles/network_plugin/macvlan/templates/centos-postdown-macvlan.cfg.j2
+++ b/roles/network_plugin/macvlan/templates/centos-postdown-macvlan.cfg.j2
@@ -1,3 +1,3 @@
 {% if enable_nat_default_gateway %}
-iptables -t nat -D POSTROUTING -s {{ node_pod_cidr|ipaddr('net') }} -o {{ node_default_gateway_interface }} -j MASQUERADE
+iptables -t nat -D POSTROUTING -s {{ node_pod_cidr|ansible.utils.ipaddr('net') }} -o {{ node_default_gateway_interface }} -j MASQUERADE
 {% endif %}
diff --git a/roles/network_plugin/macvlan/templates/centos-postup-macvlan.cfg.j2 b/roles/network_plugin/macvlan/templates/centos-postup-macvlan.cfg.j2
index 340bf7257378cab467ebefd88bbc36aa75316c44..254827e43589c34f6eb5eabdc6416f4110ac39f7 100644
--- a/roles/network_plugin/macvlan/templates/centos-postup-macvlan.cfg.j2
+++ b/roles/network_plugin/macvlan/templates/centos-postup-macvlan.cfg.j2
@@ -1,3 +1,3 @@
 {% if enable_nat_default_gateway %}
-iptables -t nat -I POSTROUTING -s {{ node_pod_cidr|ipaddr('net') }} -o {{ node_default_gateway_interface }} -j MASQUERADE
+iptables -t nat -I POSTROUTING -s {{ node_pod_cidr|ansible.utils.ipaddr('net') }} -o {{ node_default_gateway_interface }} -j MASQUERADE
 {% endif %}
diff --git a/roles/network_plugin/macvlan/templates/coreos-network-macvlan.cfg.j2 b/roles/network_plugin/macvlan/templates/coreos-network-macvlan.cfg.j2
index ac67389892127a4dbbfd4d545f7d9c048576d291..0c4c33b0a67ba004bbf653eaa77914c54744b605 100644
--- a/roles/network_plugin/macvlan/templates/coreos-network-macvlan.cfg.j2
+++ b/roles/network_plugin/macvlan/templates/coreos-network-macvlan.cfg.j2
@@ -2,7 +2,7 @@
 Name=mac0
 
 [Network]
-Address={{ node_pod_cidr|ipaddr('net')|ipaddr(1)|ipaddr('address') }}/{{ node_pod_cidr|ipaddr('prefix') }}
+Address={{ node_pod_cidr|ansible.utils.ipaddr('net')|ansible.utils.ipaddr(1)|ansible.utils.ipaddr('address') }}/{{ node_pod_cidr|ansible.utils.ipaddr('prefix') }}
 
 {% for host in groups['kube_node'] %}
 {% if hostvars[host]['access_ip'] is defined  %}
diff --git a/roles/network_plugin/macvlan/templates/coreos-service-nat_ouside.j2 b/roles/network_plugin/macvlan/templates/coreos-service-nat_ouside.j2
index 5f00b00c498ac3793c1b570a7ce91002a4e4c24d..1d8df03191d7eac6a9575eed731cba7ad26a3fd0 100644
--- a/roles/network_plugin/macvlan/templates/coreos-service-nat_ouside.j2
+++ b/roles/network_plugin/macvlan/templates/coreos-service-nat_ouside.j2
@@ -1,6 +1,6 @@
 [Service]
 Type=oneshot
-ExecStart=/bin/bash -c "iptables -t nat -I POSTROUTING -s {{ node_pod_cidr|ipaddr('net') }} -o {{ node_default_gateway_interface }} -j MASQUERADE"
+ExecStart=/bin/bash -c "iptables -t nat -I POSTROUTING -s {{ node_pod_cidr|ansible.utils.ipaddr('net') }} -o {{ node_default_gateway_interface }} -j MASQUERADE"
 
 [Install]
 WantedBy=sys-subsystem-net-devices-mac0.device
diff --git a/roles/network_plugin/macvlan/templates/debian-network-macvlan.cfg.j2 b/roles/network_plugin/macvlan/templates/debian-network-macvlan.cfg.j2
index 3b3e2e4ca2ccf0e9f4f32260d827e8d2e1ad2dfe..cbd4325c9dacaa5bb2aa6e8ef6bee3905286370a 100644
--- a/roles/network_plugin/macvlan/templates/debian-network-macvlan.cfg.j2
+++ b/roles/network_plugin/macvlan/templates/debian-network-macvlan.cfg.j2
@@ -1,9 +1,9 @@
 auto mac0
 iface mac0 inet static
-    address {{ node_pod_cidr|ipaddr('net')|ipaddr(1)|ipaddr('address') }}
-    network {{ node_pod_cidr|ipaddr('network') }}
-    netmask {{ node_pod_cidr|ipaddr('netmask') }}
-    broadcast {{ node_pod_cidr|ipaddr('broadcast') }}
+    address {{ node_pod_cidr|ansible.utils.ipaddr('net')|ansible.utils.ipaddr(1)|ansible.utils.ipaddr('address') }}
+    network {{ node_pod_cidr|ansible.utils.ipaddr('network') }}
+    netmask {{ node_pod_cidr|ansible.utils.ipaddr('netmask') }}
+    broadcast {{ node_pod_cidr|ansible.utils.ipaddr('broadcast') }}
     pre-up ip link add link {{ macvlan_interface }} mac0 type macvlan mode bridge
 {% for host in groups['kube_node'] %}
 {% if hostvars[host]['access_ip'] is defined  %}
@@ -13,7 +13,7 @@ iface mac0 inet static
 {% endif %}
 {% endfor %}
 {% if enable_nat_default_gateway %}
-    post-up iptables -t nat -I POSTROUTING -s {{ node_pod_cidr|ipaddr('net') }} -o {{ node_default_gateway_interface }} -j MASQUERADE
+    post-up iptables -t nat -I POSTROUTING -s {{ node_pod_cidr|ansible.utils.ipaddr('net') }} -o {{ node_default_gateway_interface }} -j MASQUERADE
 {% endif %}
 {% for host in groups['kube_node'] %}
 {% if hostvars[host]['access_ip'] is defined  %}
@@ -22,5 +22,5 @@ iface mac0 inet static
 {% endif %}
 {% endif %}
 {% endfor %}
-    post-down iptables -t nat -D POSTROUTING -s {{ node_pod_cidr|ipaddr('net') }} -o {{ node_default_gateway_interface }} -j MASQUERADE
+    post-down iptables -t nat -D POSTROUTING -s {{ node_pod_cidr|ansible.utils.ipaddr('net') }} -o {{ node_default_gateway_interface }} -j MASQUERADE
     post-down ip link delete mac0