Ansible ping get FAILED => SSH Error: Permission denied

I’m getting permission error on basic ansible ping command. I verified ssh to remote hostname and ip address so the ssh host key is not an issue. Using CentOS7.0

If I cut/paste ssh command in ansible debug, the output will indicate I don’t have access privilege to control path under /root. I wonder why Ansible use default root path while I’m executing ansible from sudo user test.

[test@hjma291 ~]$ sudo ansible apacheweb -m ping -vvvv

well .. when you 'sudo ansible' you are running ansible as root, since
it creates things in ~/.ansible ... in this case ~/ translates to
/root

when you copy and paste the ssh command, YOU are not root nor running
sudo, hence the difference.

normally you don't run anible inside sudo, what are you trying to accomplish?