Try to set in your ec2.ini: destination_variable=Name
On Friday, October 16, 2015 at 10:16:13 AM UTC+5, Nicolas G wrote: > > 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. > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/82122b39-8415-4f29-be24-670ba2efc3d3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.