Unbreak on OpenBSD, underprivileged users from packages start with

_underscore, as well as such groups, therefore on OpenBSD, the
user:group is _puppetdb:_puppetdb

Because of that, instead of the single default in params.pp,
move the definition of puppetdb_user and puppetdb_group into
one of the OS specific case statement.
This commit is contained in:
Sebastian Reitenbach 2016-06-08 20:00:59 +02:00
parent 6be627da3a
commit a19d30c2e8

View file

@ -64,8 +64,6 @@ class puppetdb::params inherits puppetdb::globals {
$puppetdb_package = 'puppetdb'
$puppetdb_service = 'puppetdb'
$puppetdb_user = 'puppetdb'
$puppetdb_group = 'puppetdb'
$masterless = false
if !($puppetdb_version in ['latest','present','absent']) and versioncmp($puppetdb_version, '3.0.0') < 0 {
@ -129,12 +127,23 @@ class puppetdb::params inherits puppetdb::globals {
case $::osfamily {
'RedHat', 'Suse', 'Archlinux': {
$puppetdb_user = 'puppetdb'
$puppetdb_group = 'puppetdb'
$puppetdb_initconf = '/etc/sysconfig/puppetdb'
}
'Debian': {
$puppetdb_user = 'puppetdb'
$puppetdb_group = 'puppetdb'
$puppetdb_initconf = '/etc/default/puppetdb'
}
'OpenBSD','FreeBSD': {
'OpenBSD': {
$puppetdb_user = '_puppetdb'
$puppetdb_group = '_puppetdb'
$puppetdb_initconf = undef
}
'FreeBSD': {
$puppetdb_user = 'puppetdb'
$puppetdb_group = 'puppetdb'
$puppetdb_initconf = undef
}
default: {