It’s been awhile since I played with Ansible and right now Im tearing my hair out on this copy problem. Im trying to copy a directory on a Linux host to a new location. In ad-hoc ansible, it looks like this…
ansible -m copy -a “src=/usr/share/folder1 dest=/config/folder2” servers
When I run this command, Ansible tells me it can’t find the directory…
10.10.10.107 | FAILED! => {
“changed”: false,
“failed”: true,
“msg”: “Unable to find ‘/usr/share/folder1’ in expected paths.”
}
Yet, when I go on the host, I can clearly see that the source directory exists. Im thinking this is something terribly obvious since I’ve now tried this on multiple hosts and get the same error each time. I know Ansible is working because I can run adhoc shell commands and touch files, see the pwd, etc.
Any ideas at all? What am I missing?
Thanks!