Skip to content

Instantly share code, notes, and snippets.

@rj-reilly
Created March 15, 2017 16:58
Show Gist options
  • Save rj-reilly/02428aa3c3af768c460d2c029ec65d3b to your computer and use it in GitHub Desktop.
Save rj-reilly/02428aa3c3af768c460d2c029ec65d3b to your computer and use it in GitHub Desktop.
chef_gem 'chef-provisioning-vsphere' do
action :install
compile_time true
end
require 'chef/provisioning/vsphere_driver'
with_vsphere_driver host: '192.168.1.4',
insecure: true,
user: 'administrator@vsphere.local',
password: 'xxx'
with_machine_options :bootstrap_options => {
use_linked_clone: true,
num_cpus: 2,
memory_mb: 4096,
network_name: ["VM Network"],
datacenter: 'redding',
resource_pool: 'Prod',
template_folder: 'Templates',
template_name: 'ubuntu1604',
customization_spec: {
ipsettings: {
dnsServerList: ['192.168.1.1']
},
:domain => 'local'
},
:ssh => {
:user => 'root',
:password => 'xxx',
:paranoid => false,
}
}
machine "jenkins" do
run_list ['app_jenkins::build_dev']
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment