examples/win-provision.rb in chef-provisioning-vsphere-2.2.2 vs examples/win-provision.rb in chef-provisioning-vsphere-2.3.0

- old
+ new

@@ -1,43 +1,42 @@ -require 'chef/provisioning' -require 'chef/provisioning/vsphere_driver' +# frozen_string_literal: true +require "chef/provisioning" +require "chef/provisioning/vsphere_driver" - # # This is the main way to connect to vSphere # -with_vsphere_driver host: '172.16.20.2', - insecure: true, - user: 'administrator@vsphere.local', - password: 'PASSWORD' +with_vsphere_driver host: "172.16.20.2", + insecure: true, + user: "administrator@vsphere.local", + password: "PASSWORD" # # These are the machine_options that you need to declare # -win_bootstrap_options = { :bootstrap_options => { - num_cpus: 2, - memory_mb: 8096, - datacenter: 'Datacenter', - resource_pool: 'Cluster', - template_folder: 'Windows', - template_name: 'windows2012R2', - :ssh => { - :user => 'Administrator', - :password => 'P@ssw0rd!!!', - :paranoid => false, - :port => "5985" - } - }, - ssh_options: { :keepalive => true, :keepalive_interval => 50, :user_known_hosts_file => '/dev/null' }, - ready_timeout: '30' - } +win_bootstrap_options = { bootstrap_options: { + num_cpus: 2, + memory_mb: 8096, + datacenter: "Datacenter", + resource_pool: "Cluster", + template_folder: "Windows", + template_name: "windows2012R2", + ssh: { + user: "Administrator", + password: "P@ssw0rd!!!", + paranoid: false, + port: "5985", + }, +}, + ssh_options: { keepalive: true, keepalive_interval: 50, user_known_hosts_file: "/dev/null" }, + ready_timeout: "30" } # # WinRM requires a Chef server (not sure why) so you need to declare it here # with_chef_server "https://api.chef.io/organizations/ORG", - :client_name => Chef::Config[:node_name], - :signing_key_filename => Chef::Config[:client_key] + client_name: Chef::Config[:node_name], + signing_key_filename: Chef::Config[:client_key] # # This is where you can declare the machine # machine "testing-windows" do