templates/Vagrantfile.erb in kitchen-vagrant-0.17.0 vs templates/Vagrantfile.erb in kitchen-vagrant-0.18.0
- old
+ new
@@ -28,20 +28,35 @@
<% if config[:guest] %>
c.vm.guest = "<%= config[:guest] %>"
<% end %>
-<% if config[:username] %>
- c.ssh.username = "<%= config[:username] %>"
+<% if config[:communicator] %>
+ <% if config[:username] %>
+ c.<%= config[:communicator] %>.username = "<%= config[:username] %>"
+ <% end %>
+ <% if config[:password] %>
+ c.<%= config[:communicator] %>.password = "<%= config[:password] %>"
+ <% end %>
+<% else %>
+ <% if config[:username] %>
+ c.ssh.username = "<%= config[:username] %>"
+ <% end %>
+ <% if config[:password] %>
+ c.ssh.password = "<%= config[:password] %>"
+ <% end %>
<% end %>
-<% if config[:password] %>
- c.ssh.password = "<%= config[:password] %>"
-<% end %>
+
<% if config[:ssh_key] %>
c.ssh.private_key_path = "<%= config[:ssh_key] %>"
<% end %>
<% config[:ssh].each do |key, value| %>
c.ssh.<%= key %> = <%= value %>
+<% end %>
+<% if config[:winrm] %>
+ <% config[:winrm].each do |key, value| %>
+ c.winrm.<%= key %> = <%= value %>
+ <% end %>
<% end %>
<% Array(config[:network]).each do |opts| %>
c.vm.network(:<%= opts[0] %>, <%= opts[1..-1].join(", ") %>)
<% end %>