Red Hat Ansible
If you plan on starting with
Ansible any time soon, one thing you can really appreciate is that prior to having a smooth post-configuration process you’re going to configure a number of pre-existing servers, all from different periods and possibly running different operating systems. Some might even use different SSH port.
As you know, Ansible uses standard SSH port for connecting to Unix/Linux servers remotely. Default SSH port is 22, but it’s possible to configure SSH to use some other port – and this becomes a problem because Ansible can’t connect to such hosts.
It’s fairly easy to make Ansible recognise that some server needs to be accessed using a different port. Simply expand your Ansible hosts entry from something like this (you’re going to have different hostname and IP address, most likely):
That’s all there is to it! Enjoy!