Facing using while connecting to remote host
Well, this is in no way an ansible issue, unless you are a bit more verbose.
Do you have any console output?
Can you ping the host?
Can you ssh to the host as the ansible user?
If not, solve those issues, then come back.
“solve those issues. then come back,” does not mean, “Post those issues here and we will help you solve them.”
This list is intended for discussion of Ansible development. It is not intended for Ansible usage questions, and it is certainly not intended for generic IT questions such as yours. We have no idea why you can’t ping or SSH to 172.31.28.77 from 172.31.30.161. Whatever the answer to that question is, it has nothing to do with Ansible, and this isn’t the right place to ask for help solving it.
(I usually send “This doesn’t belong on this list” admonishments privately, but I’m sending this one to the list because I already told the OP this privately and yet he persists in sending off-topic emails to the list.)