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/1ac09c5a-9fc5-d906-5ac3-8f02eaeb41f8%40olstad.com.
For more options, visit https://groups.google.com/d/optout.