ansible 1.9.0.1 mistakenly reports "Input file not found" while using copy module

Hello,

I have the following task in a ply-book:

  • name: Copy
    copy: src={{ dl_folder }}/{{ dl_filename }} dest={{ dl_folder }}/testdir
    sudo: yes
    when: download_file.stat.exists == true
    register: file_copy

The file exists as validated by the when clause. However, the error message is:

TASK: [linkysas_config/domain/pre-requisites | Copy] **************************
fatal: [gate0505.distribution.edf.fr] => input file not found at /logiciels/tmp/deploy-toolbox-1.9.0.tar or /logiciels/tmp/deploy-toolbox-1.9.0.tar

FATAL: all hosts have already failed – aborting

which is not true because the file exists as shown below:

CB1791DN@gate0505.distribution.edf.fr> sudo ls -l /logiciels/tmp
Mot de passe de CB1791DN:
total 1059640
-rwxrwxrwx 1 root root 9697280 Apr 23 17:59 deploy-toolbox-1.9.0.tar
-rwxrwxrwx 1 root root 1075362983 Apr 14 16:22 svr_weblogic-server.12.1.3_linux_rhe5-rhe6_n1-n3^1.0.sh
drwxrwxrwx 2 root root 4096 Apr 23 17:03 testdir
CB1791DN@gate0505.distribution.edf.fr>

I searched a lot but didn’t find anything. What the problem might be as I cannot beleive I’m the only one having it.

Kind regards,

Nicolas

Nicolas, how about running the playbook with -vvvv for maximum verbosity and check the output?
Y.