I am encountering a problem where I am running the same tasks on 2 remote nodes and the directories that those commands are executed at are different.
If I run pwd
through Ansible on each remote host before this command, they return different paths. For example /usr
and /usr/src
. If I log into the remote host manually I go to /usr/src
for both (As specified in their configuration files).
Can anyone explain to me why is this happening? To what directory does Ansible go if you run a command without specifying a chdir
?