Re: [ansible-project] Strategies for testing if network range available

2017-07-13 Thread Dick Visser
On 12 July 2017 at 23:54, Josef Fortier 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-abo

[ansible-project] Strategies for testing if network range available

2017-07-12 Thread Josef Fortier
My goal is to fail early and warn if storage network not set up (and set up mounts if it is set up). I've an approach that seems to work OK, but was wondering if there is a preferred/better path set_fact: has_storage_lan: '{{ ansible_all_ipv4_addresses|join()|match("10.0.20.") }}' This am