Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
add another automatic group by tag name (which can easily set when... #53165
…creating Vultr instances via Ansible)
Since the Vultr plugin seems not to support features like
With this feature you can group servers dynamically and individually. E.g. you want to group a region-wide cluster, I give all those servers the tag name
Edit: I changed the type to bug, see below for more info; tl;dr without the tag field, this plugin is a nice toy but not useful for production
bcoca left a comment
to support those features you just need to inherit from Constructable, seems a lot more useful than updating the code each time you want new groups (also it forces these groups on other users that might already be happy with current output).
Could you pls elaborate on this? Thx.
I think you might missed the point. The 'tag' field at Vultr is exactly for this use case, to just add any kind of group/filter/whatever you like without updating the code each time you want new groups. It gives you full freedom/flexibility and you can set it to any value you want. Leaving this important field out feels even more like a bug than a feature. I'll edit my PR on this regard.
I could say that for all my use case a default hard-coded region-based group setting like it is now implemented, is completely useless. All my systems are global/CDN-like and I never change their state based on a region. So, what's the point and we don't need to bikeshed which group filter should go into the code. Thus, we need a field which can be set by the user => 'tag' and the rest is nice-to-have and should not be hard-coded like it is now.
So, I think that this Vultr plugin without 'tag'-support, without all the nice things the AWS-EC2-plugin has (keyed groups, groups, etc. => hint => user-defined groups are built-in there) is a nice toy but not really for production. This is super sad since Vultr offers the fastest VPS'. Hence, I'd love to see Vultr's 'tag' field supported and the region-field deprecated with a warning.
BTW, don't confuse Vultr's tag field with Ansible's 'tag'.
@desmap He's not against it, he's just advising that you use
This allows you to specify how you want to list your inventory instead of hardcoding it. Unfortunately, I don't know much about this and there's not a lot to go by in the docs for me but you can give it a shot.
@bcoca hm... this is exactly what I am saying: the AWS-EC2 has all this fancy stuff while the Vultr plugin does not have any of them just OS and region hard-coded and that we need to change that, adding the 'tag' field would be just a first super urgent step. You guys are welcome to make it even better then. Or I didn't get your message again...
So what's next? I am not a Python guy and should not mess more with that code base, I mean I can try if you tell what should be exactly done beyond my extra 'tag' field. Btw, what's with @Spredzy? Any opinions, you wrote the plugin, would be awesome if you sent a sign of life!
Or should I switch to Terraform, I mean look what full-fledged solution they have => https://github.com/squat/terraform-provider-vultr? Compared to them, the Ansible-Vultr-plugin feels like...
@bcoca, @Spredzy, c'mon let's either fix this asap (merge my PR or make a better suggestion) or just decide against, then I know where I am at and can move on. A weeks long discussion wouldn't be appropriate here.
Looking forward to next steps!