ipaddr filter returns true for 10.247

12 views
Skip to first unread message

Mumshad Mannambeth

unread,
Jan 10, 2017, 9:29:39 AM1/10/17
to Ansible Project
Hi,

I am trying to use the ipaddr ir ipv4 filter to test if a string is a valid ip address. 

10.247.1.1 -> True
10.247.1.  -> False

10.247      -> True -> 10.247.0.0



The last condition returns True even if the text only contains a portion of IP Address. Is there a way to force the filter to fail in this condition and pass only when all 4 parts are available?

Thanks,
Reply all
Reply to author
Forward
0 new messages