Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hostname options concatenation in aws_ec2 #58052

Open
wants to merge 1 commit into
base: devel
from

Conversation

Projects
None yet
2 participants
@j8r
Copy link

commented Jun 19, 2019

SUMMARY

Adds hostname options concatenation in the aws_ec2 inventory plugin.

This change adds support for list of options, that will be concatenated with an underscore to create the inventory name.

Example:

hostnames:
 - [ "tag:Name", private-ip-address ] #=> myinstance_10.10.10.10

Fixes #55911

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

ansible.inventory.plugins.aws_ec2

ADDITIONAL INFORMATION

Amazon Auto Scaling Groups allow to have a group of one or multiple instances, that scales depending of policies.
However, they all share the same tags and dns name. If the ASG includes several instances, only 1 will be targeted when using this options. IPs and Instance IDs are unique, but using them isn't user-friendly.

In order to still use the tag:Name, an unique identifier like an IP or an Instance ID has to be appended.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.