Skip to content
This repository was archived by the owner on Mar 28, 2019. It is now read-only.

Commit 7e7619f

Browse files
author
Zach Leslie
committed
Tune group and user for OpenBSD
This work ensures that the agent configuration will use the group and user native to the given platform for permission handling.
1 parent 5afb9b0 commit 7e7619f

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

manifests/init.pp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@
1313
$ssldir = $puppet::params::puppet_ssldir,
1414
$rundir = $puppet::params::puppet_rundir,
1515
$confdir = $puppet::params::puppet_confdir,
16+
$user = $puppet::params::puppet_user,
17+
$group = $puppet::params::puppet_group,
1618
) inherits puppet::params {
1719

1820
file { $confdir:
1921
ensure => 'directory',
20-
owner => 'puppet',
21-
group => 'puppet',
22+
owner => $user,
23+
group => $group,
2224
}
2325
}

manifests/params.pp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,4 +125,14 @@
125125
}
126126
default: { fail("Sorry, ${::operatingsystem} is not supported") }
127127
}
128+
129+
$puppet_user = $::osfamily ? {
130+
'OpenBSD' => '_puppet',
131+
default => 'puppet',
132+
}
133+
134+
$puppet_group = $::osfamily ? {
135+
'OpenBSD' => '_puppet',
136+
default => 'puppet',
137+
}
128138
}

0 commit comments

Comments
 (0)