You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
I wanted to accomplish something like this. I wanted to use the ansible facts like ansible_eth0.ipv4.address to check if this fact is defined.
- name: Check if eth0 interface setup
fail: msg="eth0 interface not setup"
when: ansible_eth0.ipv4.address is not defined
But ansible is throwing error at me
I am using gather_facts: yes
fatal: [xxxxxxxxx] => error while evaluating conditional: ansible_eth1.ipv4.address is not defined
I am using 1.5.4
Michael Peters
unread,
Nov 25, 2014, 1:59:44 PM11/25/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
First, that's a really old version of ansible, and you need to upgrade.
Second, the "when" clause uses jinja syntax and it's complaining that
it can't evaluate your syntax: it's a syntax error, not a fact error.
In jinja, the "not" needs to come before the expression it's negating.
Try something like this: