Version information
This version is compatible with:
- Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
- Puppet >= 4.7.0 < 6.0.0
- , , ,
Start using this module
Add this module to your Puppetfile:
mod 'vinzent-puppetserver5', '1.0.3'
Learn more about managing modules with a PuppetfileDocumentation
puppetserver5
Install & configure puppetserver 5.
This module really only manages what puppetserver package provides. All other things should be done at the profile level (if using the roles/profiles pattern).
Setup
Setup Requirements
What this module doesn't do and you need to ensure yourself before including it:
- It doesn't configure the puppet package repository
- It doesn't manage puppet.conf settings
Beginning with puppetserver5
Most of the params are optional. If you don't pass a value, then the module won't try to manage the setting at all.
If you pass the string 'ABSENT' to settings params then the setting will be removed.
Simple example:
include puppetserver5
Complex example:
class { 'puppetserver5':
init_java_args => '-Xmx8g -Xms8g -XX:+UseG1GC -XX:ReservedCodeCacheSize=512m -Djruby.logger.class=com.puppetlabs.jruby_utils.jruby.Slf4jLogger',
init_jruby_jar => '/opt/puppetlabs/server/apps/puppetserver/jruby-9k.jar',
service_ca_disable => true,
auth_allow_header_cert_info => true,
jruby_puppet_max_active_instances => 6,
jruby_puppet_max_requests_per_instance => 10000,
webserver_host => '127.0.0.1',
webserver_port => 18140,
webserver_ssl_host => 'ABSENT',
webserver_ssl_port => 'ABSENT',
product_check_for_updates => false,
}
If you wan't to manage auth.conf rules with puppetlabs/puppet_authorization you'll need to ensure it only gets manage after the package is installed and that it sends a notify to the service reload class.
Class['puppetserver5::install']
-> puppet_authorization { 'xyz': ... }
~> Class['puppetserver5::service::reload']
See REFERENCE.md for the puppet strings generated documentation.
Reference
Table of Contents
Classes
puppetserver5
: Install and configure puppetserver 5puppetserver5::config
: Private class that manages settings that require a restart of the daemonpuppetserver5::config::reloadonly
: Private class that manages settings that only require a reload of the service but not a full restart.puppetserver5::install
: Private class to install the puppetserver packagepuppetserver5::service
: Private class to manage the puppetserver servicepuppetserver5::service::reload
: Private class which triggers a service reload when notified.
Functions
Classes
puppetserver5
Many of the settings allow you to specifiy the string ABSENT to remove the setting completly. If not passing a value (aka undef) then the module does not try to manage it at all.
- See also https://puppet.com/docs/puppetserver/5.3/external_ssl_termination.html https://puppet.com/docs/puppetserver/5.3/configuration.html https://github.com/puppetlabs/trapperkeeper-webserver-jetty9/blob/master/doc/jetty-config.md https://puppet.com/docs/puppetserver/5.3/restarting.html https://puppet.com/docs/puppetserver/5.3/tuning_guide.html
Examples
Basic example - install and start
include puppetserver5
Complex example
class { 'puppetserver5':
init_java_args => '-Xmx8g -Xms8g -XX:+UseG1GC -XX:ReservedCodeCacheSize=512m -Djruby.logger.class=com.puppetlabs.jruby_utils.jruby.Slf4jLogger',
init_jruby_jar => '/opt/puppetlabs/server/apps/puppetserver/jruby-9k.jar',
service_ca_disable => true,
auth_allow_header_cert_info => true,
jruby_puppet_max_active_instances => 6,
jruby_puppet_max_requests_per_instance => 10000,
webserver_host => '127.0.0.1',
webserver_port => 18140,
webserver_ssl_host => 'ABSENT',
webserver_ssl_port => 'ABSENT',
product_check_for_updates => false,
}
Parameters
The following parameters are available in the puppetserver5
class.
package_manage
Data type: Boolean
Set to false if the package is installed by other means.
Default value: true
package_name
Data type: String
Use another package name to install
Default value: 'puppetserver'
service_manage
Data type: Boolean
Set to false if you don't want to manage the service with this module.
Default value: true
service_name
Data type: String
Define the name of the service.
Default value: 'puppetserver'
service_ensure
Data type: Stdlib::Ensure::Service
Define the service ensure param when running
is not what you want.
Default value: 'running'
service_enable
Data type: Boolean
Set to false if you don't wan't to enable the service at boot.
Default value: true
init_configfile_path
Data type: Stdlib::AbsolutePath
Path to the sysconfig puppetserver file
Default value: '/etc/sysconfig/puppetserver'
init_java_args
Data type: Optional[String]
Manage the JAVA_ARGS env param in the sysconfig file
Default value: undef
init_jruby_jar
Data type: Puppetserver5::AbsolutePathOrABSENT
Manage the JRUBY_JAR param in the sysconfig file
Default value: undef
service_ca_cfg_path
Data type: Stdlib::AbsolutePath
Path to the ca.cfg service config file
Default value: '/etc/puppetlabs/puppetserver/services.d/ca.cfg'
auth_conf_path
Data type: Stdlib::AbsolutePath
Path to the auth.conf file
Default value: '/etc/puppetlabs/puppetserver/conf.d/auth.conf'
service_ca_disable
Data type: Optional[Boolean]
Set to true to disable the ca service
Default value: undef
puppetserver_conf_path
Data type: Stdlib::AbsolutePath
Path to the puppetserver.conf file
Default value: '/etc/puppetlabs/puppetserver/conf.d/puppetserver.conf'
product_conf_path
Data type: Stdlib::AbsolutePath
Path to the product.conf file
Default value: '/etc/puppetlabs/puppetserver/conf.d/product.conf'
webserver_conf_path
Data type: Stdlib::AbsolutePath
Path to the webserver.conf file
Default value: '/etc/puppetlabs/puppetserver/conf.d/webserver.conf'
auth_allow_header_cert_info
Data type: Puppetserver5::BooleanOrABSENT
Set to true to allow passing cert info with HTTP headers (beaware of security implications!)
Default value: undef
jruby_puppet_max_active_instances
Data type: Puppetserver5::IntegerOrABSENT
Configure max-active-instances tuning option
Default value: undef
jruby_puppet_max_requests_per_instance
Data type: Puppetserver5::IntegerOrABSENT
Configure max-request-per-instance tuning option
Default value: undef
webserver_host
Data type: Puppetserver5::HostOrABSENT
Configure HTTP host to bind to
Default value: undef
webserver_port
Data type: Puppetserver5::PortOrABSENT
Configure HTTP port to use
Default value: undef
webserver_ssl_host
Data type: Puppetserver5::HostOrABSENT
Configure HTTPS host to bind to
Default value: undef
webserver_ssl_port
Data type: Puppetserver5::PortOrABSENT
Configure HTTPS port to use
Default value: undef
product_check_for_updates
Data type: Puppetserver5::BooleanOrABSENT
Set to false to disable the update check (it's on by default)
Default value: undef
puppetserver5::config
Private class that manages settings that require a restart of the daemon
Examples
include puppetserver5::config
Parameters
The following parameters are available in the puppetserver5::config
class.
init_configfile_path
Data type: Stdlib::AbsolutePath
service_ca_cfg_path
Data type: Stdlib::AbsolutePath
init_vars
Data type: Optional[Hash[Pattern[/\A[A-Z_]+\Z/],Optional[String[1]]]]
Default value: undef
service_ca_disable
Data type: Optional[Boolean]
Default value: undef
puppetserver5::config::reloadonly
Private class that manages settings that only require a reload of the service but not a full restart.
Parameters
The following parameters are available in the puppetserver5::config::reloadonly
class.
auth_conf_path
Data type: Stdlib::AbsolutePath
webserver_conf_path
Data type: Stdlib::AbsolutePath
puppetserver_conf_path
Data type: Stdlib::AbsolutePath
product_conf_path
Data type: Stdlib::AbsolutePath
product_conf_settings
Data type: Optional[Hash[Pattern[/\A[a-z\-\.]+\Z/],Optional[Any]]]
Default value: undef
webserver_conf_settings
Data type: Optional[Hash[Pattern[/\A[a-z\-\.]+\Z/],Optional[Any]]]
Default value: undef
puppetserver_conf_settings
Data type: Optional[Hash[Pattern[/\A[a-z\-\.]+\Z/],Optional[Any]]]
Default value: undef
auth_conf_settings
Data type: Optional[Hash[Pattern[/\A[a-z\-\.]+\Z/],Optional[Any]]]
Default value: undef
puppetserver5::install
Private class to install the puppetserver package
Examples
include puppetserver5::install
Parameters
The following parameters are available in the puppetserver5::install
class.
package_name
Data type: String
package_manage
Data type: Boolean
puppetserver5::service
Private class to manage the puppetserver service
Examples
include puppetserver5::service
Parameters
The following parameters are available in the puppetserver5::service
class.
service_name
Data type: String
service_manage
Data type: Boolean
service_ensure
Data type: Stdlib::Ensure::Service
service_enable
Data type: Boolean
puppetserver5::service::reload
Private class which triggers a service reload when notified.
Examples
include puppetserver5::service::reload
Parameters
The following parameters are available in the puppetserver5::service::reload
class.
service_manage
Data type: Boolean
Functions
puppetserver5::to_ensure
Type: Puppet Language
The puppetserver5::to_ensure function.
puppetserver5::to_ensure(Any $value)
The puppetserver5::to_ensure function.
Returns: Enum['present','absent']
value
Data type: Any
Dependencies
- puppetlabs/stdlib (>= 4.13.1 < 5.0.0)
- puppetlabs/hocon (>= 1.0.0 < 2.0.0)