Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
- action :delete
- run_list ['my_cookbook::default']
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement