Could not resolve hostname: Name or service not known

1,433 views
Skip to first unread message

krishna

unread,
Mar 9, 2022, 4:54:41 PM3/9/22
to AWX Project
Hi,

I am using AWX 17.1.0 docker install. Inventory Source --> Amazon EC2 and updated source variables in inventory source to 
hostnames: 'tag:Name'

It shows all the hosts but when I run a job it throws: Failed to connect to the host via ssh: ssh: Could not resolve hostname: Name or service not known.

Does anyone had the similar issue and were able to resolve this?

Thanks

krishna

unread,
Mar 16, 2022, 8:08:26 AM3/16/22
to AWX Project
Can someone please help with this issue?

Rebeccah Hunter

unread,
Mar 16, 2022, 4:10:13 PM3/16/22
to AWX Project
Hi there,

The team thinks you may be having troubles with internal/routable hostnames. You can work around this by picking another identifier to get the hostname of the server that should be in the inventory. (the variable for that https://docs.ansible.com/ansible/latest/collections/amazon/aws/aws_ec2_inventory.html#parameter-hostnames).
The general docs for selecting the options instead of the hostname are here: https://docs.ansible.com/ansible-tower/latest/html/userguide/inventories.html#amazon-web-services-ec2

cheers,
AWX Team

Reply all
Reply to author
Forward
0 new messages