I think what you're asking for can be found by looking at the example for "By
specifying a network range as a query, you can check if a given value is in
that range:" in the docs.

An example playbook:

---
- hosts: localhost
  connection: local
  tasks:

    - debug:
        msg: belongs
      when: item | ipaddr('192.168.0.0/8')
      loop:
        - 192.168.0.45
        - 192.1.0.4/24
        - 127.0.0.1


Hope that helps!

On Mon, Jun 15, 2020 at 5:58 PM Ryan Merolle <[email protected]> wrote:

> Hello Scott,
>
> I’m very familiar with the documented functions of the ipaddr filter.  If
> you look at the link you just sent cidr_lookup is not a documented
> function, but it is listed in the source code of the filter as I linked to
> in my original post.
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/7c3c2bc1-1e2d-4778-abed-63f6c910bff9o%40googlegroups.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAPcsqxniGcePCuQhNUGvYyxG1KHYykY9gvFTJhaEZFRzPhxf6A%40mail.gmail.com.

Reply via email to