Sha256: c9cf02b894d1e28b9445bfe4c2f99ecbf1a9f2adefb4af73214338cf0923c08d
Contents?: true
Size: 1.3 KB
Versions: 36
Compression:
Stored size: 1.3 KB
Contents
# # Cookbook Name:: mu-activedirectory # Recipe:: domain-controller # # Copyright 2015, eGlobalTech, # # All rights reserved - Do Not Redistribute # include_recipe 'chef-vault' domain_admin = chef_vault_item(node['ad']['admin_auth']['vault'], node['ad']['admin_auth']['item']) can_add_controller = false case node['platform'] when "windows" ::Chef::Recipe.send(:include, Chef::Mixin::PowershellOut) require 'chef/win32/version' version = Chef::ReservedNames::Win32::Version.new if version.windows_server_2012? || version.windows_server_2012_r2? can_add_controller = true else Chef::Log.info "Requires Windows Server 2012 or 2012R2, current version is #{version})" end else Chef::Log.info("Unsupported platform #{node['platform']}") end if can_add_controller mu_activedirectory_domain_controller node['ad']['domain_name'] do netbios_name node['ad']['netbios_name'] domain_admin_user domain_admin[node['ad']['admin_auth']['username_field']] domain_admin_password domain_admin[node['ad']['admin_auth']['password_field']] restore_mode_password domain_admin[node['ad']['admin_auth']['password_field']] site_name node['ad']['site_name'] computer_name node['ad']['computer_name'] sites node['ad']['sites'] existing_dc_ips node['ad']['dc_ips'] end end
Version data entries
36 entries across 36 versions & 1 rubygems