It is necessary to reduce the water connection parameters for the ansible - so that it is universal. There is an ssh config for 2 gates:
gate_1
Host 10.20.30.40 Hostname %h User centos ForwardAgent yes ProxyCommand ssh user@111.222.333.444 -W %h:%p
gate_2
Host 10.30.40.50 Hostname %h User centos ForwardAgent yes ProxyCommand ssh user2@222.333.444.555 -W %h:%p
How to add to the command connection for ansible - in the connection string - the second gate? ansible_ssh_user=centos ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q user@111.222.333.444"'