How to copy a file from windows to linux

Hi all,
I want to copy a file from windows to linux but I cannot do that. I trıed win_copy module and remote_src=yes and job was success but the file did not exist on target machine. Where I am wrong. Thanks for helps.

Slurp to ansible controller then copy to linux

Actually, as a same result.

25 Haziran 2021 Cuma tarihinde saat 22:42:56 UTC+3 itibarıyla weiye...@gmail.com şunları yazdı:

What do yoy mean. Is it doing the same thing? Can you please share play book and task?

  • name: copy file from windows to tower
    copy_win:
    src : c:\tmp\b.txt
    dest: /tmp

remote_src: yes

output :

{
“src”: “c:\test\b.txt”,
“_ansible_no_log”: false,
“dest”: “/tmp”,
“checksum”: “f88f94f974393a32cedc172ea3f7f4affb82f4c2”,
“changed”: true,
“original_basename”: “b.txt”,
“operation”: “file_copy”,
“size”: 7
}

the job finished successfuly, the file does not exist in tmp directory

25 Haziran 2021 Cuma tarihinde saat 23:28:52 UTC+3 itibarıyla weiye...@gmail.com şunları yazdı:

That’s not using the slurp module

https://docs.ansible.com/ansible/latest/collections/ansible/builtin/slurp_module.html

Thanks for your answer, it opens my sight but I still do not copy content to file on disk. I tried copy module again but it did not work. My playbook and output are below.