Hi,
I’m able to run Ansible on AWS using ec2.py successfully but unfortunately I get the public DNS of the instance instead of the Name tag :
ansible -i plugins/inventory/ec2.py “tag_Environment_prod” -m shell -a “uptime”
ec2-54-205-89-44.compute-1.amazonaws.com | success | rc=0 >>
Filesystem Size Used Avail Use% Mounted on
/dev/xvde1 7.9G 6.4G 1.2G 85% /
tmpfs 296M 0 296M 0% /dev/shm
/dev/xvdj 99G 973M 93G 2% /srv
Is there a way I can set the return to be the ec2 tag names which reflects to my instances fqdn’s so instead of seeing ec2-54-205-89-44.compute-1.amazonaws.com I want to see something like db3.example.com ?
Regards,
Nicolas.