1

Seeking help from those who've worked with dynamic inventory in Ansible.

I have Ansible set up with the aws_ec2 plugin (not using the python script as it's been too problematic). Currently, I'm only using an aws_ec2.yaml file as my inventory and variable source of truth.

When I run ansible-inventory --graph, Ansible returns my instances as public AWS DNS hostnames. I want either private DNS hostname or IP address so I SSH will against the hosts (we have firewall rule blocking ssh against the public AWS hostname).

How can I instruct the aws_ec2 module to do this via the plugin? Thanks.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.