I am able to ping ansible nodes/target machine as root but not as a user.I am doing this on aws ec2.I am getting this
node1 | UNREACHABLE! => {"changed": false,"msg": "Failed to connect to the host via ssh: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).","unreachable": true}node1 is target/slave machine
see below image for more details