stat upside down

22 views
Skip to first unread message

Diogene Laerce

unread,
Jul 24, 2014, 9:33:49 AM7/24/14
to ansible...@googlegroups.com
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



signature.asc

Michael DeHaan

unread,
Jul 24, 2014, 6:43:39 PM7/24/14
to ansible...@googlegroups.com
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...


Reply all
Reply to author
Forward
0 new messages