diff --git a/manifests/init.pp b/manifests/init.pp index b51690bb..1b33d378 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -524,6 +524,12 @@ # $server_max_open_files:: Increase the max open files limit for Puppetserver. # Defaults to undef # +# $server_versioned_code_id The path to an executable script that Puppet Server invokes to generate a code_id +# Defaults to undef +# $server_versioned_code_content Contains the path to an executable script that Puppet Server +# invokes when on static_file_content requests. +# Defaults to undef +# # === Usage: # # * Simple usage: @@ -720,6 +726,9 @@ Boolean $server_ca_allow_auth_extensions = $puppet::params::server_ca_allow_auth_extensions, Boolean $server_ca_enable_infra_crl = $puppet::params::server_ca_enable_infra_crl, Optional[Integer[1]] $server_max_open_files = $puppet::params::server_max_open_files, + Optional[String] $server_versioned_code_id = undef, + Optional[String] $server_versioned_code_content = undef, + ) inherits puppet::params { contain puppet::config diff --git a/manifests/server.pp b/manifests/server.pp index 8a6f7cd8..57d76935 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -327,6 +327,10 @@ # The number of selector threads actually used by Jetty is twice the number of selectors # requested. For example, if a value of 3 is specified for the ssl-selector-threads setting, # Jetty will actually use 6 selector threads. +# versioned_code_id The path to an executable script that Puppet Server invokes to generate a code_id +# versioned_code_content Contains the path to an executable script that Puppet Server invokes when an agent makes +# a static_file_content API request for the contents of a file resource that +# has a source attribute with a puppet:/// URI value. class puppet::server( Variant[Boolean, Stdlib::Absolutepath] $autosign = $::puppet::autosign, Array[String] $autosign_entries = $::puppet::autosign_entries, @@ -443,6 +447,8 @@ Boolean $ca_allow_auth_extensions = $::puppet::server_ca_allow_auth_extensions, Boolean $ca_enable_infra_crl = $::puppet::server_ca_enable_infra_crl, Optional[Integer[1]] $max_open_files = $::puppet::server_max_open_files, + Optional[String] $versioned_code_id = $::puppet::server_versioned_code_id, + Optional[String] $versioned_code_content = $::puppet::server_versioned_code_content, ) { if $ca { $ssl_ca_cert = "${ssl_dir}/ca/ca_crt.pem" diff --git a/manifests/server/puppetserver.pp b/manifests/server/puppetserver.pp index e61e09f6..8c29ca66 100644 --- a/manifests/server/puppetserver.pp +++ b/manifests/server/puppetserver.pp @@ -127,6 +127,8 @@ $ca_allow_auth_extensions = $::puppet::server::ca_allow_auth_extensions, $ca_enable_infra_crl = $::puppet::server::ca_enable_infra_crl, $max_open_files = $::puppet::server::max_open_files, + $versioned_code_id = $::puppet::server::versioned_code_id, + $versioned_code_content = $::puppet::server::versioned_code_content, ) { include ::puppet::server diff --git a/templates/server/puppetserver/conf.d/puppetserver.conf.erb b/templates/server/puppetserver/conf.d/puppetserver.conf.erb index a8f0b070..1724e717 100644 --- a/templates/server/puppetserver/conf.d/puppetserver.conf.erb +++ b/templates/server/puppetserver/conf.d/puppetserver.conf.erb @@ -77,6 +77,13 @@ jruby-puppet: { <%- end -%> } +<%- if @versioned_code_id and @versioned_code_content %> +versioned-code { + code-id-command: <%= @versioned_code_id %> + code-content-command: <%= @versioned_code_content %> +} +<%- end -%> + # settings related to HTTPS client requests made by Puppet Server http-client: { # A list of acceptable protocols for making HTTPS requests