-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
Flexible hostname for Scaleway Dynamic Inventory #41658
Conversation
Could you tell me how could we handle machines that got only private IP? What about IPv6 addresses? What are other plugins doing typically? |
In the aws_ec2 inventory plugin this is a configurable option.
I'm assuming this is causing a traceback right now because the key doesn't exist. But if it isn't causing a traceback, a workaround could be using the
Compose won't change the hostname listed with ansible-inventory --graph (inventory_hostname), but it will change the IP ansible connects to. |
8a5d863
to
5039500
Compare
@s-hertel Thanks a lot for the explanation. I've started building a similar feature. |
ad6868f
to
275998e
Compare
@pilou- @maxamillion Could you take a look? I think the dynamic inventory in scaleway starts to be way more useful with this :) |
Is this error normal: https://app.shippable.com/github/ansible/ansible/runs/72262/34/console |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great to me. It would be good if someone using scaleway could test it - @pilou- are you able to?
Could it be backported to 2.6 ? |
I tested using "ansible-inventory" command and worked great. The only question is why I can use 'ping' module to a IPv6 address, but this question doesn't seems related to this pull request. The only problem is in this part of code:
You repeated "choices:" two times, which avoid the possible values to field to appear on help. |
@mhalano fixed |
rebuild_merge |
@maxamillion What could we could do to get it merge. I don't think the build fails because of my MR. |
rebuild_merge |
@maxamillion I've rebased and pushed again. I hope I will get lucky with the CI this time. |
rebuild_merge |
The CI is happy :) could this get merged and backported? |
@sieben I think this change is big and not security related, so I wouldn't a good idea to backport that. My $0.02. |
I think this would be a feature and not so much "bugfix" or "security" so I'm not sure it's a candidate for backport, but if there's a reason this falls under one of those categories and I'm simply lacking perspective, I'm open to discussion on the topic. |
@maxamillion Why do you think that this is not a bugfix? Currently the inventory is unusable in version 2.6 as ansible tries to connect using the server id. |
@sklemmer This added a new option. Sometimes features and bugfixes overlap. If you need this on an older version you can add the corrected plugin code in your plugin path and make sure it is enabled if you need the functionality now (the same idea as putting custom/modified modules in your
You can use |
SUMMARY
Using IP address is more common to index servers. This PR changes the key to index machines from scaleway id to its public IP.
ISSUE TYPE
COMPONENT NAME
ANSIBLE VERSION