Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ####
- # stored in a provisionvm cookbook
- ####
- chef_gem 'chef-provisioning-vsphere' do
- action :install
- compile_time true
- end
- require 'chef/provisioning/vsphere_driver'
- with_vsphere_driver host: '##.infra.local',
- insecure: true,
- user: '#\##',
- password: '#####!'
- with_machine_options :bootstrap_options => {
- use_linked_clone: true,
- datacenter: '##',
- host: '##',
- template_name: '2012R2_30-Dec-16',
- template_folder: 'Templates',
- vm_folder: 'New Builds',
- network_name: 'Production LAN',
- num_cpus: 2,
- memory_mb: 4096,
- datastore: '##',
- customization_spec: {
- domain: 'local',
- win_time_zone: '083',
- product_id: '',
- org_name: '##',
- ipsettings: {
- ip: '192.168.3.90',
- subnetMask: '255.255.252.0',
- dnsServerList: ['192.168.1.19'],
- gateway: ['192.168.1.1']
- }
- },
- ssh: {
- user: '##',
- password: '##',
- paranoid: false
- }
- },
- :convergence_options => {
- :ssl_verify_mode => :verify_none
- },
- ready_timeout: 480
- ########
- ## In a webserver cookbook - the create cluster recipe
- ########
- machine "webserver-02" do
- run_list ['webserver::webserver-config']
- tag 'webserver'
- end
- ###
- # The command line
- ###
- chef-client -o 'provisionvm::vmware_dev','webserver::create-cluster' -c .chef/knife.rb
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement