Re: [ansible-project] Update : stat upside down

2014-07-27 Thread 'Diogene Laerce' via Ansible Project
On 07/25/2014 12:44 AM, Michael DeHaan wrote: I think I replied to the previous copy of this one, please see the other thread. Sorry about that. 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

Re: [ansible-project] Update : stat upside down

2014-07-27 Thread Michael DeHaan
I think you are misunderstanding the return codes of the stat module. When the file is not there, it doesn't register a None in the file location. Insert this line, and you'll see what I mean: - debug: var=I I would also recommend naming variables something other than I, for readability

Re: [ansible-project] Update : stat upside down

2014-07-27 Thread 'Diogene Laerce' via Ansible Project
On 07/27/2014 03:20 PM, Michael DeHaan wrote: I think you are misunderstanding the return codes of the stat module. Nooo.. Why would you say that ? :) When the file is not there, it doesn't register a None in the file location. Insert this line, and you'll see what I mean: - debug:

[ansible-project] Update : stat upside down

2014-07-24 Thread 'Diogene Laerce' via Ansible Project
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

Re: [ansible-project] Update : stat upside down

2014-07-24 Thread Michael DeHaan
I think I replied to the previous copy of this one, please see the other thread. It can sometimes be confusing as the very first post to the list is moderated to prevent spam, so I occasionally double approve a duplicate post. On Thu, Jul 24, 2014 at 10:11 AM, 'Diogene Laerce' via Ansible