Нужно свести параметры подключения водну строку для ansible - чтобы это было универсально. Есть ssh конфиг для 2 гейтов:
gate_1
Host 10.20.30.40
Hostname %h
User centos
ForwardAgent yes
ProxyCommand ssh [email protected] -W %h:%p
gate_2
Host 10.30.40.50
Hostname %h
User centos
ForwardAgent yes
ProxyCommand ssh [email protected] -W %h:%p
Как добавить в команду подключения для ansible - в строку подключения - второй гейт?
ansible_ssh_user=centos
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q [email protected]"'