Ansible closed issue | Can not list multiple hosts have different ports on a same hostname
Published in
1 min readJul 16, 2018
I put hostname setting to my ssh config and solve it.
~/.ssh/config
Host dockerhost1
HostName localhost
Port 2221Host dockerhost2
HostName localhost
Port 2222Host dockerhost3
HostName localhost
Port 2223
Fixed inventory file
[group1]
dockerhost1[group2]
dockerhost2