# Issue 399 (support multiple hosts on different ports)

**URL:** <https://forum.ansible.com/t/issue-399-support-multiple-hosts-on-different-ports/11637>\
**Category:** Ansible Project\
**Created:** [July 2, 2012, 8:42am UTC](https://forum.ansible.com/t/issue-399-support-multiple-hosts-on-different-ports/11637 "2012-07-02T08:42:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cosmin\_Luta](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@Cosmin\_Luta](https://forum.ansible.com/u/Cosmin_Luta)\
**Post date:** [July 2, 2012, 8:42am UTC](https://forum.ansible.com/t/issue-399-support-multiple-hosts-on-different-ports/11637/1 "2012-07-02T08:42:31Z")

</div>

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](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!
