From 3178e84b65d3da318f818a0891b0fcc4b747d559 Mon Sep 17 00:00:00 2001 From: Xabier de Zuazo Date: Sun, 22 May 2016 18:58:58 +0200 Subject: [PATCH] Fix ssh boolean values in Vagrantfile template (related to #163) --- spec/kitchen/driver/vagrant_spec.rb | 4 +++- templates/Vagrantfile.erb | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/spec/kitchen/driver/vagrant_spec.rb b/spec/kitchen/driver/vagrant_spec.rb index a9b00ff7..b11f6952 100644 --- a/spec/kitchen/driver/vagrant_spec.rb +++ b/spec/kitchen/driver/vagrant_spec.rb @@ -1111,7 +1111,8 @@ def run_command(_cmd, options = {}) config[:ssh] = { :username => %{jdoe}, :password => %{secret}, - :private_key_path => %{/key} + :private_key_path => %{/key}, + :insert_key => false } cmd @@ -1119,6 +1120,7 @@ def run_command(_cmd, options = {}) c.ssh.username = "jdoe" c.ssh.password = "secret" c.ssh.private_key_path = "/key" + c.ssh.insert_key = false RUBY end diff --git a/templates/Vagrantfile.erb b/templates/Vagrantfile.erb index 9a9902ec..9c6005e0 100644 --- a/templates/Vagrantfile.erb +++ b/templates/Vagrantfile.erb @@ -54,7 +54,7 @@ Vagrant.configure("2") do |c| c.ssh.private_key_path = "<%= config[:ssh_key] %>" <% end %> <% config[:ssh].each do |key, value| %> - c.ssh.<%= key %> = "<%= value %>" + c.ssh.<%= key %> = <%= value.inspect %> <% end %> <% if config[:winrm] %> <% config[:winrm].each do |key, value| %>