Skip to content

Commit 16f9a98

Browse files
Merge pull request #120 from bschonec/master
Added rundir, localconfig and ssldir parameters.
2 parents 97d6a8e + a8c5bd3 commit 16f9a98

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

manifests/agent.pp

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737
# ['serialization_package'] - defaults to undef, if provided, we install this package, otherwise we fall back to the gem from 'serialization_format'
3838
# ['http_proxy_host'] - The hostname of an HTTP proxy to use for agent -> master connections
3939
# ['http_proxy_port'] - The port to use when puppet uses an HTTP proxy
40+
# ['localconfig'] - Where puppet agent caches the local configuration. An extension indicating the cache format is added automatically.
41+
# ['rundir'] - Where Puppet PID files are kept.
42+
# ['puppet_ssldir'] - Puppet sll directory
4043
#
4144
# Actions:
4245
# - Install and configures the puppet agent
@@ -66,6 +69,7 @@
6669
$syslogfacility = undef,
6770
$priority = undef,
6871
$logdir = undef,
72+
$rundir = $::puppet::params::rundir,
6973

7074
#[agent]
7175
$srv_domain = undef,
@@ -99,6 +103,8 @@
99103
$cron_minute = undef,
100104
$serialization_format = undef,
101105
$serialization_package = undef,
106+
$localconfig = undef,
107+
$puppet_ssldir = $::puppet::params::puppet_ssldir,
102108
) inherits puppet::params {
103109

104110
if ! defined(User[$::puppet::params::puppet_user]) {
@@ -252,6 +258,30 @@
252258
}else {
253259
$orderign_ensure = 'absent'
254260
}
261+
if $localconfig != undef {
262+
ini_setting {'puppetagentlocalconfig':
263+
ensure => present,
264+
setting => 'localconfig',
265+
value => $localconfig,
266+
}
267+
}
268+
if $puppet_ssldir != undef {
269+
ini_setting {'puppetagentsldir':
270+
ensure => present,
271+
section => 'main',
272+
setting => 'ssldir',
273+
value => $puppet_ssldir,
274+
}
275+
}
276+
277+
# rundir has no default and must be provided.
278+
ini_setting {'puppetagentrundir':
279+
ensure => present,
280+
section => 'main',
281+
setting => 'rundir',
282+
value => $rundir,
283+
}
284+
255285
ini_setting {'puppetagentordering':
256286
ensure => $orderign_ensure,
257287
setting => 'ordering',

manifests/params.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
$puppet_run_interval = 30
3535
$classfile = '$statedir/classes.txt'
3636
$package_provider = undef # falls back to system default
37-
37+
$rundir = '/var/run/puppet'
3838
$puppet_passenger_ssl_protocol = 'TLSv1.2'
3939
$puppet_passenger_ssl_cipher = 'AES256+EECDH:AES256+EDH'
4040

0 commit comments

Comments
 (0)