From a943f67da192f1e759f29b78a7f8a00bad10c1d2 Mon Sep 17 00:00:00 2001 From: Dmitry Vasilets Date: Wed, 24 Aug 2016 17:07:04 +0200 Subject: [PATCH] support ansible for remote servers and vm --- plugins/provisioners/ansible/provisioner/host.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/provisioners/ansible/provisioner/host.rb b/plugins/provisioners/ansible/provisioner/host.rb index 929c66542..7d298ffce 100644 --- a/plugins/provisioners/ansible/provisioner/host.rb +++ b/plugins/provisioners/ansible/provisioner/host.rb @@ -233,6 +233,9 @@ module VagrantPlugins proxy_cmd += " exec nc %h %p 2>/dev/null" + ssh_options << "-o ProxyCommand='#{ proxy_cmd }'" + elsif @machine.provider_name == :libvirt && @machine.provider_config.connect_via_ssh + proxy_cmd = @machine.ssh_info[:proxy_command] ssh_options << "-o ProxyCommand='#{ proxy_cmd }'" end