Ansible : SSH Error: ControlPath too long

前端 未结 2 1219
陌清茗
陌清茗 2021-01-07 05:34

I run a computer with Ubuntu 15.10 and I try to run Vagrant with Ansible.

Before start, I like to say that I don\'t have any i

2条回答
  •  别那么骄傲
    2021-01-07 06:25

    The very first sentence of the documentation for OpenSSH specific settings in Ansible says:

    Under the [ssh_connection] header, the following settings are tunable for SSH connections.

    So you need to place the ssh_args variable in [ssh_connection] section of the ansible.cfg, for example:

    [defaults]
    timeout = 600
    
    [ssh_connection]
    ssh_args = -o ControlMaster=off
    

    In fact overriding the ssh_args with an empty value disables the defaults for ControlMaster/ControlPersistent/ControlPath in Ansible, so it should simply be:

    [ssh_connection]
    ssh_args =
    

提交回复
热议问题