2015-11-11 21:43:57 +00:00
|
|
|
class profile::puppetmaster {
|
2015-08-03 21:44:35 +00:00
|
|
|
|
2015-12-12 02:22:22 +00:00
|
|
|
$hiera_yaml = "${::settings::confdir}/hiera.yaml"
|
|
|
|
|
2015-08-03 21:44:35 +00:00
|
|
|
class { 'hiera':
|
|
|
|
hierarchy => [
|
2015-08-18 21:01:20 +00:00
|
|
|
'virtual/%{::virtual}',
|
2015-08-14 00:10:55 +00:00
|
|
|
'nodes/%{::trusted.certname}',
|
|
|
|
'common',
|
2015-08-03 21:44:35 +00:00
|
|
|
],
|
2015-12-12 02:22:22 +00:00
|
|
|
hiera_yaml => $hiera_yaml,
|
2015-08-14 17:41:03 +00:00
|
|
|
datadir => '/etc/puppetlabs/code/environments/%{environment}/hieradata',
|
2015-11-17 22:10:45 +00:00
|
|
|
owner => 'pe-puppet',
|
|
|
|
group => 'pe-puppet',
|
2015-10-15 19:22:45 +00:00
|
|
|
notify => Service['pe-puppetserver'],
|
2015-08-03 21:44:35 +00:00
|
|
|
}
|
2015-08-14 23:17:25 +00:00
|
|
|
|
2016-01-06 23:19:06 +00:00
|
|
|
ini_setting { 'puppet.conf hiera_config master section' :
|
|
|
|
ensure => absent,
|
|
|
|
path => "${::settings::confdir}/puppet.conf",
|
2015-12-12 02:22:22 +00:00
|
|
|
section => 'master',
|
|
|
|
setting => 'hiera_config',
|
|
|
|
value => $hiera_yaml,
|
|
|
|
notify => Service['pe-puppetserver'],
|
|
|
|
}
|
|
|
|
|
|
|
|
#remove the default hiera.yaml from the code-staging directory
|
|
|
|
#after the next code manager deployment it should be removed
|
|
|
|
#from the live codedir
|
|
|
|
file { '/etc/puppetlabs/code-staging/hiera.yaml' :
|
|
|
|
ensure => absent,
|
|
|
|
}
|
|
|
|
|
2015-10-26 21:59:20 +00:00
|
|
|
#Lay down update-classes.sh for use in r10k postrun_command
|
|
|
|
#This is configured via the pe_r10k::postrun key in hiera
|
|
|
|
file { '/usr/local/bin/update-classes.sh' :
|
|
|
|
ensure => file,
|
2015-10-26 22:12:39 +00:00
|
|
|
source => 'puppet:///modules/profile/puppetmaster/update-classes.sh',
|
2015-10-30 20:42:33 +00:00
|
|
|
mode => '0755',
|
2015-10-26 21:59:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#https://docs.puppetlabs.com/puppet/latest/reference/config_file_environment.html#environmenttimeout
|
2015-10-30 20:42:33 +00:00
|
|
|
ini_setting { 'environment_timeout = unlimited':
|
2015-10-26 21:59:20 +00:00
|
|
|
ensure => present,
|
|
|
|
path => '/etc/puppetlabs/puppet/puppet.conf',
|
|
|
|
section => 'main',
|
|
|
|
setting => 'environment_timeout',
|
|
|
|
value => 'unlimited',
|
2015-10-28 17:37:59 +00:00
|
|
|
notify => Service['pe-puppetserver'],
|
2015-10-26 21:59:20 +00:00
|
|
|
}
|
|
|
|
|
2015-08-03 21:44:35 +00:00
|
|
|
}
|