Ansible SSH forwarding doesn't seem to work with Vagrant

前端 未结 6 1286
Happy的楠姐
Happy的楠姐 2021-01-31 04:17

OK, strange question. I have SSH forwarding working with Vagrant. But I\'m trying to get it working when using Ansible as a Vagrant provisioner.

I found out exactly what

6条回答
  •  醉梦人生
    2021-01-31 05:01

    I've found that I need to do two separate things (on Ubuntu 12.04) to get it working:

    • the -o ForwardAgent thing that @Lorin mentions
    • adding /etc/sudoers.d/01-make_SSH_AUTH_SOCK_AVAILABLE with these contents:

      Defaults env_keep += "SSH_AUTH_SOCK"
      

提交回复
热议问题