I want to copy files from my ansible controller to a remote machine. When i run the playbook with -vvv i get the error "Source /path/to/file/file.txt not found". I have become: yes in my playbook as well as for this specific task. I also tried using the become_user: root but that did not work. The directory I am trying to access is owned by nagios so I also tried become_user: nagios but I got the same error. The permissions on the directory are "drwx------" but since I am using become: yes this shouldn't be an issue right? Here's a part of my playbook:
- name: Send file to client
become: true
become_user: root
src: /path/to/file.txt
dest: /remote/path/
owner: nagios
group: nagios
mode: '0644'
remote_src: yes