No, still skipping. But I got the answer. Check the forum https://groups.google.com/forum/?#!topic/ansible-project/BBbdxspBzHI
2014-11-11 18:04 GMT+01:00 Petros Moisiadis <ernes...@yahoo.gr>: > On 11/11/14 18:32, Petros Moisiadis wrote: > > On 11/11/14 18:12, cdar z wrote: > > Sorry, I made mistake. Bad example. I meant this one: > > $ cat inv > local ansible_connection=local > $ cat extra.yml > --- > - set_fact: bar=hello > - debug: msg="baz {{ bar }}" > $ cat playbook.yml > --- > - hosts: local > tasks: > - include: extra.yml > when: bar is not defined > $ ansible-playbook -i inv playbook.yml > > PLAY [local] > ****************************************************************** > > GATHERING FACTS > *************************************************************** > ok: [local] > > TASK: [set_fact bar=hello] > **************************************************** > ok: [local] > > TASK: [debug msg="baz {{ bar }}"] > ********************************************* > skipping: [local] > > PLAY RECAP > ******************************************************************** > local : ok=2 changed=0 unreachable=0 failed= > 0 > > $ > > > Hello, > > Does it work as expected if you replace "with: bar is not defined" with > "with: bar is undefined" ? > > > Obviously, I meant 'when: ...' and not 'with: ...' > -- 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 ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAL5WStkuGqS6aVfpV7z4366yivTiyiChRJidLz1t8uMOF3gnkg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.