diff --git a/plugins/provisioners/ansible/provisioner/host.rb b/plugins/provisioners/ansible/provisioner/host.rb index b86157208..2bc67c3fe 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 << "-i '#{key}'" + ssh_options << "-o IdentityFile=%s" % [ key.gsub('%', '%%') ] end end