From fa5864c446a57d9a2ded5fd6211d646598ba9444 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 25 Oct 2024 14:25:28 +0200 Subject: [PATCH] Add support for PE This enables user to run foreman-proxy on a Puppet Enterprise primary. --- manifests/init.pp | 2 +- manifests/params.pp | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index ad86ce3f..3d0fb244 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -309,7 +309,7 @@ Foreman_proxy::ListenOn $puppetca_listen_on = 'https', Stdlib::Absolutepath $ssldir = $foreman_proxy::params::ssldir, Stdlib::Absolutepath $puppetdir = $foreman_proxy::params::puppetdir, - String $puppet_group = 'puppet', + String $puppet_group = $foreman_proxy::params::puppet_group, String $puppetca_provider = 'puppetca_hostname_whitelisting', Stdlib::Absolutepath $autosignfile = $foreman_proxy::params::autosignfile, Boolean $puppetca_sign_all = false, diff --git a/manifests/params.pp b/manifests/params.pp index 430df520..28fe7477 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -174,4 +174,11 @@ # shares cached_data with the foreman module so they're the same $oauth_consumer_key = extlib::cache_data('foreman_cache_data', 'oauth_consumer_key', extlib::random_password(32)) $oauth_consumer_secret = extlib::cache_data('foreman_cache_data', 'oauth_consumer_secret', extlib::random_password(32)) + + # 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_group = $facts['is_pe'] ? { + true => 'pe-puppet', + default => 'puppet' + } }