Doesn't seem to be working when I implement it in my code:

   - name: If the IP address is destined for the .1 subnet...
     when: set_machinename | ipaddr('192.168.1.0/32')

It still skips over this range even if I specify set_machinename to 
'192.168.1.4'.

On Tuesday, October 31, 2017 at 11:33:50 AM UTC-4, Kai Stian Olstad wrote:
>
> On 31. okt. 2017 16:24, Dave wrote: 
> > Is it possible to test for conditions based on partial matches? I'm 
> trying 
> > to test for variables that match a specific /24 range and I have the 
> > following so far: 
> > 
> >   - name: If the IP address is destined for the .1 subnet... 
> > 
> >       when: set_machinename | match("192.168.1.") 
> > 
> > I tried a wildcard as shown here 
> > <http://docs.ansible.com/ansible/latest/playbooks_tests.html> but that 
> > didn't seem to work either. Any ideas? 
>
>
> Take a look at this page, 
> https://docs.ansible.com/ansible/latest/playbooks_filters_ipaddr.html 
>
>
> -- 
> Kai Stian Olstad 
>

-- 
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/55bbe5f7-48d0-40ae-876b-38237a0bafff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to