Several non-standard ssh ports

Hello everyone,
I am new in ansible. Therefore I have a question about editing the ansible.cfg.
I am running a couple of server on different non-standard ssh ports e.g.
55500 55008 55012 etc.

How can I configure that in the ansible.cfg? I already tried with seperated ,

Thanks in advance

Igor

It’s better to specify host port for each host in your inventory or you can grouping host by port number

Hi Igor, non-standard SSH ports typically go into the inventory,
not into ansible.cfg.

You can do either

    [somegroup]
    somehost:2222

or

    [somegroup]
    somehost ansible_port=2222

See

    https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html#assigning-a-variable-to-one-machine-host-variables

for more details.

Cheers
-Andi

I would recommend looking into the inventory file.