Advertisement
Guest User

Untitled

a guest
Jan 6th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. ####
  2. # stored in a provisionvm cookbook
  3. ####
  4.  
  5. chef_gem 'chef-provisioning-vsphere' do
  6. action :install
  7. compile_time true
  8. end
  9.  
  10. require 'chef/provisioning/vsphere_driver'
  11.  
  12. with_vsphere_driver host: '##.infra.local',
  13. insecure: true,
  14. user: '#\##',
  15. password: '#####!'
  16.  
  17. with_machine_options :bootstrap_options => {
  18. use_linked_clone: true,
  19. datacenter: '##',
  20. host: '##',
  21. template_name: '2012R2_30-Dec-16',
  22. template_folder: 'Templates',
  23. vm_folder: 'New Builds',
  24. network_name: 'Production LAN',
  25. num_cpus: 2,
  26. memory_mb: 4096,
  27. datastore: '##',
  28. customization_spec: {
  29. domain: 'local',
  30. win_time_zone: '083',
  31. product_id: '',
  32. org_name: '##',
  33. ipsettings: {
  34. ip: '192.168.3.90',
  35. subnetMask: '255.255.252.0',
  36. dnsServerList: ['192.168.1.19'],
  37. gateway: ['192.168.1.1']
  38. }
  39. },
  40. ssh: {
  41. user: '##',
  42. password: '##',
  43. paranoid: false
  44. }
  45. },
  46. :convergence_options => {
  47. :ssl_verify_mode => :verify_none
  48. },
  49. ready_timeout: 480
  50.  
  51. ########
  52. ## In a webserver cookbook - the create cluster recipe
  53. ########
  54.  
  55. machine "webserver-02" do
  56. run_list ['webserver::webserver-config']
  57. tag 'webserver'
  58. end
  59.  
  60.  
  61. ###
  62. # The command line
  63. ###
  64. chef-client -o 'provisionvm::vmware_dev','webserver::create-cluster' -c .chef/knife.rb
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement