On 12 July 2017 at 23:54, Josef Fortier <[email protected]> wrote:
> Is there a better way?
Yes, use the dedicated 'ipaddr' filter:
- set_fact:
has_storage_lan: "{{ ansible_all_ipv4_addresses |
ipaddr('10.0.20.0/24') }}"
http://docs.ansible.com/ansible/playbooks_filters_ipaddr.html#getting-information-about-hosts-and-networks
--
Dick Visser
Sr. System & Network Engineer
GÉANT
Want to join us? We're hiring: https://www.geant.org/jobs
--
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/CAL8fbwNTDjSbQmzHybrzXHKYjLKo%3DJTKF%3DsRbNqiVJT-%2BZKKaA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.