Skip to content

Commit

Permalink
Support new non-AIO puppet Debian packages
Browse files Browse the repository at this point in the history
The upcoming release of Debian will ship with a new non-AIO puppetserver
package, and these configuration tweaks are needed to make the module
compatible with it.
  • Loading branch information
jcharaoui authored May 16, 2023
1 parent d11580c commit b3c3deb
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
24 changes: 17 additions & 7 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,21 @@
$vardir = '/var/lib/puppet'
$sharedir = '/usr/share/puppet'
$bindir = '/usr/bin'
$server_puppetserver_dir = '/etc/puppetserver'
$server_puppetserver_vardir = $vardir
$server_puppetserver_rundir = undef
$server_puppetserver_logdir = undef
$server_ruby_load_paths = []
$server_jruby_gem_home = '/var/lib/puppet/jruby-gems'
if $facts['os']['family'] == 'Debian' {
$server_puppetserver_dir = '/etc/puppet/puppetserver'
$server_puppetserver_vardir = '/var/lib/puppetserver'
$server_puppetserver_rundir = '/run/puppetserver'
$server_puppetserver_logdir = '/var/log/puppetserver'
$server_ruby_load_paths = ['/usr/lib/puppetserver/ruby/vendor_ruby']
$server_jruby_gem_home = '/var/lib/puppetserver/jruby-gems'
} else {
$server_puppetserver_dir = '/etc/puppetserver'
$server_puppetserver_vardir = $vardir
$server_puppetserver_rundir = undef
$server_puppetserver_logdir = undef
$server_ruby_load_paths = []
$server_jruby_gem_home = '/var/lib/puppet/jruby-gems'
}
}
$root_group = undef
$puppetconf_mode = '0644'
Expand Down Expand Up @@ -269,7 +278,8 @@
$server_ssl_dir = $ssldir
$server_version = undef

if $aio_package {
if $aio_package or
($facts['os']['name'] == 'Debian' and versioncmp($facts['os']['release']['major'], '12') >= 0) {
$client_package = ['puppet-agent']
} elsif ($facts['os']['family'] =~ /(FreeBSD|DragonFly)/) {
$client_package = ["puppet${puppet_major}"]
Expand Down
2 changes: 2 additions & 0 deletions manifests/server/puppetserver.pp
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@
context => '/files/etc/rc.conf',
changes => ["set puppetserver_java_opts '\"${jvm_cmd}\"'"],
}
} elsif $facts['os']['family'] == 'Debian' and !$puppet::params::aio_package {
$server_gem_paths = ['${jruby-puppet.gem-home}', '/usr/lib/puppetserver/vendored-jruby-gems'] # lint:ignore:single_quote_string_with_variables
} else {
if $jvm_cli_args {
$changes = [
Expand Down

0 comments on commit b3c3deb

Please sign in to comment.