The full traceback is:
NoneType: None
fatal: [server]: FAILED! => {
“changed”: false,
“msg”: “dest is an existing directory, use a trailing slash if you want to fetch src into that directory”
}
I want to copy the file into my home folder (/home/user).
The full traceback is:
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/ansible/plugins/action/fetch.py”, line 176, in run
f = open(to_bytes(dest, errors=‘surrogate_or_strict’), ‘wb’)
IsADirectoryError: [Errno 21] Es un directorio: b’/home/emanuel/file.bz2’
fatal: [server]: FAILED! => {
“changed”: false,
“msg”: “Failed to fetch the file: [Errno 21] Es un directorio: b’/home/emanuel/file.bz2’”
}
It looks like you already have a directory named “/home/emanuel/file.bz2”. You need to remove or rename the existing directory before you can create a file with that same name.