Skip to content

Commit 36c836b

Browse files
committed
P:puppet: fix some paths on bookworm
1 parent c2aa1c7 commit 36c836b

File tree

2 files changed

+27
-10
lines changed

2 files changed

+27
-10
lines changed

modules/profile/manifests/puppet/server.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@
116116
user => 'gitpuppet',
117117
group => 'gitpuppet',
118118
umask => '002',
119+
require => Package['git'],
119120
}
120121

121122
file { [
@@ -153,6 +154,7 @@
153154
Concat[$::profile::puppet::common::config_file] ~> Service['puppetserver']
154155

155156
['puppetserver.conf'].each |String $file| {
157+
$puppet_agent_base_path = $profile::puppet::common::config_path
156158
file { "${server_config_path}/conf.d/${file}":
157159
ensure => file,
158160
mode => '0440',

modules/profile/templates/puppet/server/config/puppetserver.conf.erb

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# configuration for the JRuby interpreters
22
jruby-puppet: {
3+
<%- if @server_config_path == '/etc/puppetlabs/puppetserver' -%>
34
# Where the puppet-agent dependency places puppet, facter, etc...
45
# Puppet server expects to load Puppet from this location
56
ruby-load-path: [/opt/puppetlabs/puppet/lib/ruby/vendor_ruby]
@@ -12,6 +13,20 @@ jruby-puppet: {
1213
# the gem-home directory as well as any other directories that gems can be loaded
1314
# from (including the vendored gems directory for gems that ship with puppetserver)
1415
gem-path: [${jruby-puppet.gem-home}, "/opt/puppetlabs/server/data/puppetserver/vendored-jruby-gems", "/opt/puppetlabs/puppet/lib/ruby/vendor_gems"]
16+
<%- else -%>
17+
# Where the puppet-agent dependency places puppet, facter, etc...
18+
# Puppet server expects to load Puppet from this location
19+
ruby-load-path: [/usr/lib/puppetserver/ruby/vendor_ruby]
20+
21+
# This setting determines where JRuby will install gems. It is used for loading gems,
22+
# and also by the `puppetserver gem` command line tool.
23+
gem-home: /var/lib/puppetserver/jruby-gems
24+
25+
# This setting defines the complete "GEM_PATH" for jruby. If set, it should include
26+
# the gem-home directory as well as any other directories that gems can be loaded
27+
# from (including the vendored gems directory for gems that ship with puppetserver)
28+
gem-path: [${jruby-puppet.gem-home}, "/usr/lib/puppetserver/vendored-jruby-gems"]
29+
<%- end -%>
1530

1631
# PLEASE NOTE: Use caution when modifying the below settings. Modifying
1732
# these settings will change the value of the corresponding Puppet settings
@@ -25,24 +40,24 @@ jruby-puppet: {
2540
# for more information.
2641

2742
# (optional) path to puppet conf dir; if not specified, will use
28-
# /etc/puppetlabs/puppet
29-
server-conf-dir: /etc/puppetlabs/puppet
43+
# <%= @puppet_agent_base_path %>
44+
server-conf-dir: <%= @puppet_agent_base_path %>
3045

3146
# (optional) path to puppet code dir; if not specified, will use
32-
# /etc/puppetlabs/code
33-
server-code-dir: /etc/puppetlabs/code
47+
# <%= @code_path %>
48+
server-code-dir: <%= @code_path %>
3449

3550
# (optional) path to puppet var dir; if not specified, will use
36-
# /opt/puppetlabs/server/data/puppetserver
37-
server-var-dir: /opt/puppetlabs/server/data/puppetserver
51+
# <%= @server_var_dir %>
52+
server-var-dir: <%= @server_var_dir %>
3853

3954
# (optional) path to puppet run dir; if not specified, will use
40-
# /var/run/puppetlabs/puppetserver
41-
server-run-dir: /var/run/puppetlabs/puppetserver
55+
# <%= @server_run_dir %>
56+
server-run-dir: <%= @server_run_dir %>
4257

4358
# (optional) path to puppet log dir; if not specified, will use
44-
# /var/log/puppetlabs/puppetserver
45-
server-log-dir: /var/log/puppetlabs/puppetserver
59+
# <%= @server_log_dir %>
60+
server-log-dir: <%= @server_log_dir %>
4661

4762
# (optional) maximum number of JRuby instances to allow
4863
#max-active-instances: 1

0 commit comments

Comments
 (0)