ansible/ansible — pull request #2063 by piffey (2013-02-12 21:05:40+00:00)
Title: Support For Hosts Only Accessible Via Forwarding

Right now, the Ansible inventory matches one host to one address. In the case of NAT on firewalls or, as in my case, demo servers that constantly move networks and use remote ssh forwards to a connection manager, only the final server read by the inventory gets changed by a play. This change treats different ports as a separate host without modifying too much.

I didn't want to do too much refactoring since I think the inventory system looks great as it is now, so I worked this into the current system and it has been working just fine for the 15 or so hosts I have to manage this way. I tried to add in a nickname feature as well, just so they could be more easily referenced, but it turned out to be a bigger project than I have time for at the moment.