69 lines
1.5 KiB
Puppet
69 lines
1.5 KiB
Puppet
class puppet::server (
|
|
$ensure = 'present',
|
|
$dns_alt_names = undef,
|
|
$storeconfigs = false,
|
|
$storeconfigs_backend = undef,
|
|
$reports = undef,
|
|
$basemodulepath = undef,
|
|
$passenger = true) {
|
|
include puppet::common
|
|
|
|
if $passenger == true {
|
|
$pkg = 'puppetmaster-passenger'
|
|
} else {
|
|
$pkg = 'puppetmaster'
|
|
}
|
|
|
|
package { ['puppetmaster-common', $pkg]: # ensure => $ensure,
|
|
}
|
|
|
|
# ## remove disk reports from time to time
|
|
tidy { "${::puppet_vardir}/reports":
|
|
age => '4w',
|
|
recurse => true,
|
|
backup => false,
|
|
}
|
|
|
|
Ini_setting {
|
|
path => '/etc/puppet/puppet.conf',
|
|
section => 'master',
|
|
}
|
|
|
|
$dns_pres = $dns_alt_names ? {
|
|
undef => 'absent',
|
|
default => 'present',
|
|
}
|
|
|
|
ini_setting { 'puppet-server-dns_alt_names':
|
|
ensure => $dns_pres,
|
|
setting => 'dns_alt_names',
|
|
value => $dns_alt_names;
|
|
}
|
|
|
|
$mpath_pres = $basemodulepath ? {
|
|
undef => 'absent',
|
|
default => 'present',
|
|
}
|
|
|
|
ini_setting { 'puppet-server-basemodulepath':
|
|
ensure => $mpath_pres,
|
|
setting => 'basemodulepath',
|
|
value => $basemodulepath;
|
|
}
|
|
|
|
ini_setting {
|
|
'puppet-server-storeconfigs':
|
|
setting => 'storeconfigs',
|
|
value => $storeconfigs;
|
|
|
|
'puppet-server-storeconfigs_backend':
|
|
setting => 'storeconfigs_backend',
|
|
value => $storeconfigs_backend;
|
|
|
|
'puppet-server-reports':
|
|
setting => 'reports',
|
|
value => $reports;
|
|
}
|
|
|
|
}
|