You are explicitly checking that project_subtree_path is the string value
of "False", and not the boolean False.

I would likely recommend making that part of the check look like:

when: project_subtree_path|bool and not
project_subtree_full_path.stat.exists

On Tue, Jan 19, 2016 at 9:37 AM, Eduardo Esclapés Giménez <
eduardo.escla...@gmail.com> wrote:

> Hi there,
>
> A task that shoud skip is running and failing. This is the task
>
> - name: Fail if project_subtree_path is set incorrectly
>>   fail:
>>     msg: "subtree is set to '{{ project_subtree_path }}' but that path
>> does not exist in the repo. Edit `subtree_path` for '{{ site }}' in
>> `sites.yml`."
>>   when: project_subtree_path != 'False' and not
>> project_subtree_full_path.stat.exists
>
>
>
> And the error message indicates that the variable is indeed set to 'False'
>
> FAILED! => {"changed": false, "failed": true, "msg": "subtree is set to
>> 'False' but that path does not exist in the repo. Edit `subtree_path` for '
>> sobiranialimentariapv.org' in `sites.yml`."}
>
>
>
> Am I missing something on the 2.0 way of doing when?
>
> I am running 2.0.0.1 on ubuntu 14.04
>
> Thanks in advance
>
> --
> 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/cd210cc9-5150-4f81-9618-6ba756b558ca%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/cd210cc9-5150-4f81-9618-6ba756b558ca%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Matt Martz
@sivel
sivel.net

-- 
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/CAD8N0v_OuMRn7WAMPkkv-kr6KW7L2p4RZyUN7KcAmRe_dG--ng%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to