duncs / clusterssh

Cluster SSH - Cluster Admin Via SSH
https://github.com/duncs/clusterssh/wiki
902 stars 79 forks source link

Host sorting order #143

Open antofthy opened 3 years ago

antofthy commented 3 years ago

At the moment you have only two options for host order sorting. use_natural_sort = 0 or 1 one with number order, the other purely alphabetical. But also relies on a extra perl module.

I have a complex 'sort' command to order hostnames based on components. Its actually very complex sorting based on strings in hostname (tst, dev, prd) but could have easilly been based on some external database ordering too. Basically it puts the hostnames of related machines together, in test to production order!

It would be great if you can specify a sort command that takes a list of hostnames and returns the desired order (like "sort")