ssh.config through ansible.cfg behaves differently then ssh.config direct

63 views
Skip to first unread message

Jurgen Coetsiers

unread,
Feb 4, 2016, 12:37:19 PM2/4/16
to Ansible Project
Hi,

My ssh.config

Host bastion
    User ansible
    HostName bastion-server
    ProxyCommand none
    IdentityFile ~/.ssh/id_rsa
    BatchMode yes
    PasswordAuthentication no

Host *
    ServerAliveInterval 60
    TCPKeepAlive yes
    ProxyCommand ssh -q -A root@bastion nc %h %p
    ControlMaster auto
    ControlPath ~/.ssh/mux-%r@%h:%p
    ControlPersist 8h
    User root
    StrictHostKeyChecking no


My ansible.cfg
[default]
hash_behaviour=merge
transport=ssh

[ssh_connection]
ssh_args = -o ControlPersist=15m -F ssh.config -q
scp_if_ssh = True
control_path = ~/.ssh/mux-%%r@%%h:%%p

When I run ssh bastion -F ssh.config I can connect with success.

When I run ansible -i ./  meta_Pool_wearezoneeu -m setup -vvvv it gives following error:

ERROR! ERROR! ./ssh.config:1: Expected key=value host variable assignment, got: bastion


No idea why this happens. Anyone experienced a similar thing or can point me into the right direction?
Reply all
Reply to author
Forward
0 new messages