Playbook fails with OSError when using copy module
Issue
- oserror: while running playbook from Ansible Automation Platform
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: OSError: [Errno 0] Error: b'/home/user/.ansible/tmp/ansible-tmp-1683696225.54-26685-230412028333891/source' -> b'/path/to/endfile.txt'
- running simple playbook to copy local file to remote server fails with
Could not replace file
orFileNotFoundError
relating to location of file on remote server.
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: FileNotFoundError: [Errno 2] No such file or directory: b'/home/user/.ansible/tmp/ansible-tmp-1684835429.57-27450-90238709253567/source' -> b'/path/to/endfile.txt'
fatal: [server1.example.com]: FAILED! => {"changed": false, "checksum": "c9131602f09e04a246d7131edc5e100eee0d8ad3", "msg": "Could not replace file: b'/home/user/.ansible/tmp/ansible-tmp-1684835429.57-27450-90238709253567/source' to /path/to/endfile.txt: [Errno 2] No such file or directory: b'/home/user/.ansible/tmp/ansible-tmp-1684835429.57-27450-90238709253567/source' -> b'/path/to/endfile.txt'"}
when using VMware Carbon Black App on the endpoint.
Environment
- Ansible Automation Platform 2.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.