Hi In our deployments I assign a number of tags to instances at instantiation time, like Customer, Environment, Name, OS, Type, Username, etc. One tag is InventoryHostname, which is actually based on the other tags, so it looks as Customer-Environment-Type-number: "uber-prod-proxy2". I use this tag for the inventory_hostname. It can be configured in ec2.ini:
hostname_variable = tag_InventoryHostname On Wed, 8 Jul 2020 at 19:10, Guy Knights <[email protected]> wrote: > > We gather most of our host inventory using the aws_ec2 inventory plugin, and > from this each host's private IP address is used as the host identifier. Is > there a way we can also gather and use other unique identifiers to refer to > hosts as an alternative? > > Each of our hosts has an assigned EC2 "Name" tag that uniquely ids the host > so it'd be handy to be able to use this in some situations, though as we've > already been using IPs for a long time I'd prefer to just continue to keep > this as the primary means of referencing hosts. > > Is the above feasible or can hosts only have one ID? > > Thanks, > Guy > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/b7365801-91d6-46f3-b681-b4ff6ba29ef1n%40googlegroups.com. -- Dick Visser Trust & Identity Service Operations Manager GÉANT -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAL8fbwOn3G%3DN-%2BqQB6kz3F%2Bt2Nonz3wuwqBjk%3Dh-Zi0%3DwPvOMA%40mail.gmail.com.
