I got it. Thanks Kai. Wrong variable referenced.

On Tuesday, October 31, 2017 at 3:36:03 PM UTC-4, Kai Stian Olstad wrote:
>
> On 31. okt. 2017 20:28, Dave wrote: 
> > Yea, no I corrected that mistake. I meant to say /24, not /32. Still 
> gets 
> > bypassed when I run the ansible script. 
>
> What I can say it's working for me. 
>
> test.yml 
> --- 
> - hosts: localhost 
>   tasks: 
>     - debug: msg="Yay I'm running" 
>       when: set_machinename | ipaddr('192.168.1.0/24') 
>
>
> $ ansible-playbook test.yml -e set_machinename=192.168.1.4 
> PLAY [localhost] 
> ******************************************************************* 
>
> TASK [debug] 
> *********************************************************************** 
> ok: [localhost] => {} 
>
> MSG: 
>
> Yay I'm running 
>
>
>
> $ ansible-playbook test.yml -e set_machinename=192.168.2.4 
> PLAY [localhost] 
> ******************************************************************* 
>
> TASK [debug] 
> *********************************************************************** 
> skipping: [localhost] 
>
>
> Maybe you should run it with -vvv and see if something jumps or post the 
> output here. 
>
>
> -- 
> 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/d440d668-7630-48d4-9590-796249f1c5c5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to