Re: [ansible-project] when conditional and IP address, is this a bug ?

2014-05-13 Thread Julien Tognazzi
I really thought I tested your variant :-/ thanks anyway. On Tuesday, May 13, 2014 6:45:14 PM UTC+2, Matt Martz wrote: > > You when line need to be manipulated just a bit to look like: > > when: ansible_lo.ipv4.address == "127.0.0.1" > > You don't need {{}} in a when statement, you don't need to

Re: [ansible-project] when conditional and IP address, is this a bug ?

2014-05-13 Thread Michael DeHaan
You're getting an error because both the left and right value need to be quoted due to the extra template evaluation you had requested, which is why Ansible is giving the warning about this. This is simplified if you leave off the unneccessary {{ foo }} and just say "foo". On Tue, May 13, 2014 a

Re: [ansible-project] when conditional and IP address, is this a bug ?

2014-05-13 Thread Matt Martz
You when line need to be manipulated just a bit to look like: when: ansible_lo.ipv4.address == "127.0.0.1" You don't need {{}} in a when statement, you don't need to quote the whole line and you need to individually quote the IP address. --  Matt Martz m...@sivel.net On May 13, 2014 at 11:17:24

[ansible-project] when conditional and IP address, is this a bug ?

2014-05-13 Thread Julien Tognazzi
Hello, Running this test playbook, I have the following error: - hosts: localhost tasks: - name: Test IP address debug: msg="ok" when: "{{ ansible_lo.ipv4.address }} == 127.0.0.1" [WARNING]: It is unneccessary to use '{{' in conditionals, leave variables in loop expressions bare.