From 968101f6114cd1bfeec0b1b1dd10ba8c695c862a Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Mon, 19 Sep 2016 17:58:20 +0200 Subject: [PATCH] Fix #17624 (#17627) Even if the size of the network is 0, it should have a netmask. --- lib/ansible/plugins/filter/ipaddr.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/ansible/plugins/filter/ipaddr.py b/lib/ansible/plugins/filter/ipaddr.py index 46157e8bbb..32b6017e12 100644 --- a/lib/ansible/plugins/filter/ipaddr.py +++ b/lib/ansible/plugins/filter/ipaddr.py @@ -163,8 +163,7 @@ def _net_query(v): return str(v.network) + '/' + str(v.prefixlen) def _netmask_query(v): - if v.size > 1: - return str(v.netmask) + return str(v.netmask) def _network_query(v): if v.size > 1: