diff --git a/plugins/provisioners/ansible/provisioner/host.rb b/plugins/provisioners/ansible/provisioner/host.rb index 2bc67c3fe..ac5b8b2db 100644 --- a/plugins/provisioners/ansible/provisioner/host.rb +++ b/plugins/provisioners/ansible/provisioner/host.rb @@ -255,7 +255,7 @@ module VagrantPlugins # Multiple Private Keys unless !config.inventory_path && @ssh_info[:private_key_path].size == 1 @ssh_info[:private_key_path].each do |key| - ssh_options << "-o IdentityFile=%s" % [ key.gsub('%', '%%') ] + ssh_options << "-o 'IdentityFile=%s'" % [ key.gsub('%', '%%') ] end end