Unable to Connect to Remote Host but Connecting to Local Server

16 views
Skip to first unread message

wpgpo...@gmail.com

unread,
Mar 1, 2023, 12:22:19 PM3/1/23
to Ansible Project
Hello...

Looking for help and support on my issue in connecting to remote host.
Basically, I can able to ssh to remote host but when trying to run an ansible ad-hoc to test my connection, it couldn't connect to the remote host but instead the result is the local server.

here's the snapshot....
Local Server: awssandbox001.test.com.aws

inventory host
[test-server]
awstarget001.test.com.aws
awstarget002.test.co.aws

/home> ansible test-server -m shell -a 'hostname'
awstarget001.test.com.aws | CHANGED | rc=0 >>
awssandbox001.test.com.aws
awstarget002.test.com.aws | CHANGED | rc=0 >>
awssandbox001.test.com.aws


Thank you and appreciated....
Jacob


Reply all
Reply to author
Forward
0 new messages