Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Hi,
- #
- #Seems like my other issue has been closed without my questions being answered.
- #
- #All I want to know IS IT POSSIBLE TO BUILD MULTIPLE WINDOWS SERVERS USING CHEF-PROVISIONING-VSPHERE???
- #
- #how do I modify this example you've provided to customize IPs on all the servers and join them to the domain. I want to be able to build let's say 10 servers with custom IP, name, and domain etc
- #
- #
- chef_gem 'chef-provisioning-vsphere' do
- action :install
- compile_time true
- end
- require 'chef/provisioning/vsphere_driver'
- with_vsphere_driver host: '127.0.0.1',
- insecure: true,
- user: 'boomer',
- password: 'sooner'
- #Williamson 12-15-15 Big Hash value shared between machines
- shared_options = {
- :bootstrap_options => {
- use_linked_clone: false,
- network_name: ['vlan_20_172.21.20'],
- datacenter: 'devops',
- datastore: 'superfast',
- resource_pool: 'devops_Production_Cluster_01',
- vm_folder: 'Organizational Units/DEVOPS',
- template_name: 'flark',
- customization_spec: {
- ipsettings: {
- gateway: ["10.100.1.1"],
- dnsServerList: ['10.100.1.20'],
- },
- domain: 'blah.com',
- domainAdmin: 'administrator@blah.com',
- domainAdminPassword: 'Passwordyoyoyo',
- org_name: 'acme',
- product_id: 'CDAA-87DC-3455-FF77-2AAC',
- win_time_zone: 4
- },
- :ssh => {
- :user => 'administrator',
- :password => 'password',
- :paranoid => false,
- },
- :convergence_options => {
- :ssl_verify_mode => :verify_none
- }
- }
- }
- machine_batch do
- custom_options = shared_options.dup
- 1.upto(10) do |i|
- #Count from 10.100.90.21 to 30
- custom_options[:customization_spec][:ipsettings][:ip]="10.100.90.2#{i}"
- machines %w(Web1 DC1 SQL1 DC2 Web50 ChefWS1 ChefWS05 Gold Silver L1E5DVOP) do
- machine_options custom_options
- run_list ["recipe[chefrules::sqlmp4]"]
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement