Skip to content

Commit

Permalink
Add support for running on PE
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak authored and ekohl committed Dec 6, 2024
1 parent 9b0ac1e commit 2f6c193
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
Boolean $enc_upload_facts = true,
Enum['yaml', 'json'] $enc_fact_extension = $puppetserver_foreman::params::enc_fact_extension,
Stdlib::Absolutepath $puppet_home = $puppetserver_foreman::params::puppet_home,
String $puppet_user = 'puppet',
String $puppet_group = 'puppet',
String $puppet_user = $puppetserver_foreman::params::puppet_user,
String $puppet_group = $puppet_user,
Stdlib::Absolutepath $puppet_basedir = $puppetserver_foreman::params::puppet_basedir,
Stdlib::Absolutepath $puppet_etcdir = $puppetserver_foreman::params::puppet_etcdir,
Boolean $reports = true,
Expand Down
7 changes: 7 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,11 @@
$client_ssl_key = "${puppet_ssldir}/private_keys/${lower_fqdn}.pem"

$enc_fact_extension = bool2str(versioncmp($facts['puppetversion'], '7.0') >= 0, 'json', 'yaml')

# PE uses a different user/group compared to open source puppet
# the is_pe fact exists in PE and in stdlib. It can be true/false/undef (undef means open source)
$puppet_user = $facts['is_pe'] ? {
true => 'pe-puppet',
default => 'puppet'
}
}

0 comments on commit 2f6c193

Please sign in to comment.