README.md in chef-provisioning-vsphere-0.6.0 vs README.md in chef-provisioning-vsphere-0.7.0
- old
+ new
@@ -91,11 +91,11 @@
- `[:ssh][:port]` port to use for ssh/winrm (defaults to 22 for ssh or 5985 for winrm)
- `[:convergence_options][:install_msi_url]` - url to chef client msi to use (defaults to latest)
- `[:convergence_options][:install_sh_url]` - the bach script to install chef client on linux (defaults to latest)
- `[:customization_spec][:ipsettings][:ip]` static ip to assign to machine
- `[:customization_spec][:ipsettings][:subnetMask]` - subnet to use
-- `[:customization_spec][:ipsettings][:gateway]` - gateway to use
+- `[:customization_spec][:ipsettings][:gateway]` - array of possible gateways to use (this will most often be an array of 1)
- `[:customization_spec][:ipsettings][:dnsServerList]` - array of DNS servers to use
- `[:customization_spec][:domain]` - domain to use (if not 'local' on a windows machine it will attempt to domain join)
- `[:customization_spec][:domainAdmin]` - domain admin account to use for domain join on windows (should be `{user name}`@`{domain}`)
- `[:customization_spec][:domainAdminPassword]` - domain administrator password
- `[:customization_spec][:org_name]` - org name used in sysprep on windows
@@ -178,9 +178,51 @@
```
knife cookbook upload my_cookbook
chef-client -o 'my_cookbook::provision' -c .chef/knife.rb
```
+### Prefix all SSH commands with 'sudo ', for installing on hosts where options[:bootstrap_options][:ssh][:user] is not 'root'. The user must have 'NOPASSWD:ALL' in /etc/sudoers. This is compatible with chef-provisioning-fog functionality
+
+```
+chef_gem 'chef-provisioning-vsphere' do
+ action :install
+ compile_time true
+end
+
+require 'chef/provisioning/vsphere_driver'
+
+with_vsphere_driver host: 'vcenter-host-name',
+ insecure: true,
+ user: 'you_user_name',
+ password: 'your_mothers_maiden_name'
+
+with_machine_options :bootstrap_options => {
+ use_linked_clone: true,
+ num_cpus: 2,
+ memory_mb: 4096,
+ network_name: ["vlan_20_172.21.20"],
+ datacenter: 'datacenter_name',
+ resource_pool: 'cluster',
+ template_name: 'path to template',
+ customization_spec: {
+ ipsettings: {
+ dnsServerList: ['1.2.3.31','1.2.3.41']
+ },
+ :domain => 'local'
+ }
+ :ssh => {
+ :user => 'root',
+ :password => 'password',
+ :paranoid => false,
+ }
+},
+:sudo => true
+
+machine "my_machine_name" do
+ run_list ['my_cookbook::default']
+end
+
+```
## Kitchen Driver
This chef-provisioning-driver comes with a test-kitchen driver. Here are example driver options you can add to your `kitchen.yml`.
```