That doesn't quite follow for me.

However, I think you might really want this:

when: a is defined and a.stat.isfile

OR (depending on use case)

when: a is defined and not a.stat.isfile

Maybe try one of those first...




On Thu, Jul 24, 2014 at 9:32 AM, 'Diogene Laerce' via Ansible Project <
[email protected]> wrote:

> Hi,
>
> I have this strange issue. The following code was working fine (I think)
> as :
>
> ############################
>
> - name: Verify Python-3.4.1.tgz download
> stat: path=/tmp/Python-3.4.1.tgz
> register: a
> - name: Extract archive
> unarchive: >
> src=/tmp/Python-3.4.1.tgz
> dest=/home/{{ user_installer }}/src
> copy=no
> when: a.stat.isfile is not defined
>
> ############################
>
> Until today I enable it again in the playbook and it now works "upside
> down" :
> It does extract the archive only when a.stat.isfile is not defined and
> when "a.stat.isfile is defined and a.stat.isfile == true" : it just
> skips the whole code.
>
> Anyone knows what could happened here ?
>
> Thank you
>
> --
> “One original thought is worth a thousand mindless quotings.”
> “Le vrai n'est pas plus sûr que le probable.”
>
>                                               Diogene Laerce
>
>
>
>

-- 
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/CA%2BnsWgxdtXXp-Kq7eE8QXVfq8sMcdn8N01aBi25G7y2fja77xQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to