aws inventory: `hostname_variable = tag_Name` not working

16 views
Skip to first unread message

senorsmile

unread,
Mar 9, 2019, 4:57:35 PM3/9/19
to Ansible Project
I haven't used Ansible with AWS for a while.  

I am using it on a new project.  I see a newer option that didn't used to be there: 

hostname_variable = tag_Name

My understanding of this variable is that it will use the Name tag to name the host, while still using the i.p. address as the value of the ansible_host key.  

E.g. 

TASK [Get uptime] ***************************************
ok
: [host01]

instead of

TASK [Get uptime] ***************************************
ok
: [1.2.3.4]


However, setting that value in ec2.ini doesn't appear to work (as I'd expect).  Am I misunderstanding this, or possibly just doing something wrong?

senorsmile

unread,
Mar 10, 2019, 7:55:49 PM3/10/19
to Ansible Project
This appears to be the PR where this functionality was added: 
Reply all
Reply to author
Forward
0 new messages