I just started learning the basics of Ansible. And facing some problem related to server connectivity via SSH. I created a folder named publich_html and put my code into that folder and changed the permission. When I try to execute my playbook it gives me the following error
UNREACHABLE! => {"changed": false, "msg": "SSH Error: data could not be sent to the remote host. Make sure this host can be reached over ssh", "unreachable"
Whereas when I try to ping servers from user home or root user without going into a directory it pings perfectly. Here is the verbose output :
SSH: EXEC sshpass -d15 sftp -b - -C -vvv -o ForwardAgent=yes -o StrictHostKeyChecking=no -o User=root -o ConnectTimeout=10
config file is:
[default]
host_key_checking = False
I don't know where I am missing something. Anyone have any idea about it?