I’ve been quite busy lately, but I found some time to make an attempt at fixing the issue mentioned in the subject. My approach is to update the pieces of code that used to operate on a “host” string and make it work with a “host:port” string instead. You can see the changes I’ve made here: https://github.com/lcosmin/ansible/commits/feature-same-host-multiple-ports
However, even if this seems to work at first, I’m aware of a few things that are broken:
- External scripts for generating host lists need to be adapted for this
- The patterns for matching hosts used “:” with a special meaning, so that will probably interfere with the “host:port” notation
So, if anyone could review the code and maybe suggest some approaches to the issues mentioned above and/or give some other feedback, it’d be great!