diff options
author | Charles Paul <cpaul@ansible.com> | 2016-01-06 10:57:52 -0600 |
---|---|---|
committer | Charles Paul <cpaul@ansible.com> | 2016-01-06 10:57:52 -0600 |
commit | b4ed3a4f529b124b277639290d49d4edb334b2c7 (patch) | |
tree | 60c7e96c2c6121055f7c59a32b8ef7dfb3f11abb | |
parent | f7143d09a6bd07399ac0b55fba5f56b261cb6a64 (diff) | |
download | ansible-b4ed3a4f529b124b277639290d49d4edb334b2c7.tar.gz |
properly handle addresses on /31 networks
-rw-r--r-- | lib/ansible/plugins/filter/ipaddr.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ansible/plugins/filter/ipaddr.py b/lib/ansible/plugins/filter/ipaddr.py index 432de6031b..76406e45a0 100644 --- a/lib/ansible/plugins/filter/ipaddr.py +++ b/lib/ansible/plugins/filter/ipaddr.py @@ -80,7 +80,8 @@ def _ip_query(v): if v.size == 1: return str(v.ip) if v.size > 1: - if v.ip != v.network: + # /31 networks in netaddr have no broadcast address + if v.ip != v.network or not v.broadcast: return str(v.ip) def _gateway_query(v): |