Skip to content

Commit

Permalink
Merge pull request #231 from zuazo-forks/vagrantfile-ssh-boolean-fix
Browse files Browse the repository at this point in the history
Fix ssh boolean values in Vagrantfile template
  • Loading branch information
Seth Thomas committed May 22, 2016
2 parents 67a5248 + 3178e84 commit 7e4adce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion spec/kitchen/driver/vagrant_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1111,14 +1111,16 @@ def run_command(_cmd, options = {})
config[:ssh] = {
:username => %{jdoe},
:password => %{secret},
:private_key_path => %{/key}
:private_key_path => %{/key},
:insert_key => false
}
cmd

expect(vagrantfile).to match(regexify(<<-RUBY.gsub(/^ {6}/, "").chomp))
c.ssh.username = "jdoe"
c.ssh.password = "secret"
c.ssh.private_key_path = "/key"
c.ssh.insert_key = false
RUBY
end

Expand Down
2 changes: 1 addition & 1 deletion templates/Vagrantfile.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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| %>
Expand Down

0 comments on commit 7e4adce

Please sign in to comment.