Ansible : SSH Error: ControlPath too long

前端 未结 2 1220
陌清茗
陌清茗 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 =
    
    0 讨论(0)
  • 2021-01-07 06:26

    I described the problem in similar question.

    You need to change it to something shorter (if you have long hostname). For test case you can try just ./master, but for real use case, you should use at least ./s/%%h-%%r.

    0 讨论(0)
提交回复
热议问题