1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
# File 'manifests/windows.pp', line 1
class classroom::windows {
assert_private('This class should not be called directly')
# TODO: the following classes fail spec tests due to providers unable to load win32/registry
require chocolatey
include classroom::windows::geotrust
include classroom::windows::password_policy
include classroom::windows::disable_esc
include classroom::windows::alias
include classroom::windows::enable_rdp
# End failing classes
include userprefs::npp
# Just a sanity check here. Some of the platforms we use don't have Admin by default.
user { 'Administrator':
ensure => present,
groups => ['Administrators'],
}
windows_env { 'PATH=C:\Program Files\Puppet Labs\Puppet\sys\ruby\bin': }
# Not all choco packages we use have been updated with checksums
# TODO: fails spec tests due to providers unable to load win32/registry
chocolateyfeature { 'allowEmptyChecksums':
ensure => enabled,
}
Chocolateyfeature['allowEmptyChecksums'] -> Package<| provider == 'chocolatey' |>
package { ['console2', 'putty', 'unzip', 'devbox-common.extension']:
ensure => present,
provider => 'chocolatey',
require => Class['chocolatey'],
}
ini_setting { 'certname':
ensure => present,
path => "${classroom::params::confdir}/puppet.conf",
section => 'main',
setting => 'certname',
value => "${::hostname}.puppetlabs.vm",
}
# Symlink on the user desktop
file { 'C:/Users/Administrator/Desktop/puppet_confdir':
ensure => link,
target => $classroom::params::confdir,
}
if $classroom::params::role == 'adserver' {
class { 'classroom::windows::adserver':
ad_domainname => $classroom::ad_domainname,
ad_dsrmpassword => $classroom::ad_dsrmpassword,
}
# Export AD server IP to be DNS server for agents
@@classroom::windows::dns_server { 'primary_ip':
ip => $::ipaddress,
}
}
else {
Classroom::Windows::Dns_server <<||>>
}
}
|