Advertisement
Guest User

Untitled

a guest
Jun 29th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. chef_gem 'chef-provisioning-vsphere' do
  2. action :install
  3. compile_time true
  4. end
  5.  
  6. require 'chef/provisioning/vsphere_driver'
  7.  
  8. with_vsphere_driver host: 'vcenter-host-name',
  9. insecure: true,
  10. user: 'you_user_name',
  11. password: 'your_mothers_maiden_name'
  12.  
  13. with_machine_options :bootstrap_options => {
  14. use_linked_clone: true,
  15. num_cpus: 2,
  16. memory_mb: 4096,
  17. network_name: ["vlan_20_172.21.20"],
  18. datacenter: 'datacenter_name',
  19. resource_pool: 'cluster',
  20. template_name: 'path to template',
  21. customization_spec: {
  22. ipsettings: {
  23. dnsServerList: ['1.2.3.31','1.2.3.41']
  24. },
  25. :domain => 'local'
  26. }
  27. :ssh => {
  28. :user => 'root',
  29. :password => 'password',
  30. :paranoid => false,
  31. }
  32. },
  33. :sudo => true
  34.  
  35. machine "my_machine_name" do
  36. action :delete
  37. run_list ['my_cookbook::default']
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement