certs
: The certs class provides a single define,certs::site
, configurable within Hiera as well.
certs::site
: Puppet module for SSL certificate installation.
The certs class provides a single define, certs::site
, configurable within Hiera as well.
class { 'certs':
cert_path => '/path/to/certs',
key_path => '/path/to/keys',
}
The following parameters are available in the certs
class:
ca_cert
ca_content
ca_ext
ca_name
ca_path
ca_source_path
cert_chain
cert_content
cert_dir_mode
cert_ext
cert_mode
cert_path
chain_content
chain_ext
chain_name
chain_path
chain_source_path
dhparam_file
group
key_content
key_dir_mode
key_ext
key_mode
key_path
owner
service
sites
source_path
supported_os
validate_x509
Data type: Boolean
Boolean for whether to look for a CA certificate file. Optional value. (default: false).
Default value: false
Data type: Optional[String]
A string representing the contents of the CA file. Optional value. (default: undef).
Default value: undef
Data type: String
The extension of the CA certificate file.
This sets the default globally for use by all certs::site
resources.
Optional value. (default: 'crt').
Default value: lookup('certs::cert_ext')
Data type: Optional[String]
The name of the CA certificate file. Optional value. (default: undef).
Default value: undef
Data type: Stdlib::Absolutepath
Location where the CA certificate file will be stored on the managed node.
This sets the default globally for use by all certs::site
resources.
Optional value. (default: cert_path
).
Default value: lookup('certs::cert_path')
Data type: Optional[String]
The location of the CA certificate file. Typically references a module's files.
e.g. puppet:///ca_certs
will search for the mount point defined in the
fileserver.conf on the Puppet Server for the specified files.
Optional value. (default: source_path
).
Default value: $source_path
Data type: Boolean
Boolean for whether to look for a certificate chain file. Optional value. (default: false).
Default value: false
Data type: Optional[String]
A string representing the contents of the certificate file. This can only be
provided if $source_path
is undefined or an error will occur.
Optional value. (default: undef).
Default value: undef
Data type: String
Permissions of the certificate directory.
This sets the default globally for use by all certs::site
resources.
Optional value. (default: '0755').
Data type: String
The extension of the certificate file.
This sets the default globally for use by all certs::site
resources.
Optional value. (default: '.crt').
Data type: String
Permissions of the certificate files.
This sets the default globally for use by all certs::site
resources.
Optional value. (default: '0644').
Data type: Stdlib::Absolutepath
Location where the certificate files will be stored on the managed node.
This sets the default globally for use by all certs::site
resources.
Optional value. Defaults:
/etc/pki/tls/certs
on RedHat-based systems/etc/ssl/certs
on Debian-based and Suse-based systems/usr/local/etc/apache24
on FreeBSD-based systems/etc/ssl/apache2
on Gentoo-based systems
Data type: Optional[String]
A string representing the contents of the chain file. Optional value. (default: undef).
Default value: undef
Data type: String
The extension of the certificate chain file.
This sets the default globally for use by all certs::site
resources.
Optional value. (default: 'crt').
Default value: lookup('certs::cert_ext')
Data type: Optional[String]
The name of the certificate chain file. Optional value. (default: undef).
Default value: undef
Data type: Stdlib::Absolutepath
Location where the certificate chain file will be stored on the managed node.
This sets the default globally for use by all certs::site
resources.
Optional value. (default: $cert_path
).
Default value: lookup('certs::cert_path')
Data type: Optional[String]
The location of the certificate chain file. Typically references a module's files.
e.g. puppet:///chain_certs
will search for the mount point defined in the
fileserver.conf on the Puppet Server for the specified files.
Optional value. (default: $source_path
).
Default value: $source_path
Data type: String
The name of the dhparam file.
This sets the default globally for use by all certs::site
resources.
Optional value. (default: 'dh2048.pem').
Data type: String
Name of the group owner of the certificates.
This sets the default globally for use by all certs::site
resources.
Optional value. Defaults:
root
for Redhat-based, Debian-based, and Suse-based systemswheel
for FreeBSD and Gentoo-based systems
Data type: Optional[String]
A string representing the contents of the key file. This can only be
provided if $source_path
is undefined or an error will occur.
Optional value. (default: undef).
Default value: undef
Data type: String
Permissions of the private keys directory.
This sets the default globally for use by all certs::site
resources.
Optional value. (default: '0755').
Data type: String
The extension of the private key file.
This sets the default globally for use by all certs::site
resources.
Optional value. (default: '.key').
Data type: String
Permissions of the private keys.
This sets the default globally for use by all certs::site
resources.
Optional value. (default: '0600').
Data type: Stdlib::Absolutepath
Location where the private keys will be stored on the managed node.
This sets the default globally for use by all certs::site
resources.
Optional value. Defaults:
/etc/pki/tls/private
on RedHat-based systems/etc/ssl/private
on Debian-based and Suse-based systems/usr/local/etc/apache24
on FreeBSD-based systems/etc/ssl/apache2
on Gentoo-based systems
Data type: String
Name of the owner of the certificates.
This sets the default globally for use by all certs::site
resources.
Optional value. (default: 'root').
Data type: Optional[Variant[Array[String],Boolean,String]]
Name of the server service(s) to notify when certificates are updated.
Setting to false (or any Boolean) will disable service notifications.
This sets the default globally for use by all certs::site
resources.
Optional value. Defaults:
httpd
for RedHat-based systemsapache2
for Debian-based, Suse-based, and Gentoo-based systemsapache24
for FreeBSD-based systems
Default value: lookup('certs::service')
Data type: Hash
A hash of certs::site
configurations, typically provided by Hiera.
Optional value: (default: {}).
Default value: {}
Data type: Optional[String]
The location of the certificate files. Typically references a module's files.
e.g. puppet:///site_certs
will search for the mount point defined in the
fileserver.conf on the Puppet Server for the specified files.
Default value: undef
Data type: Boolean
A boolean value for whether or not the running OS is supported by the module. Configured by default data.
Default value: false
Data type: Boolean
A boolean value to determine whether or not to validate the certificate and key pairs. Failure will cause the catalog to fail compilation. Optional value. (default: false).
Default value: false
Can be used in conjunction with puppetlabs/apache's apache::vhost definitions, to provide the ssl_cert and ssl_key files, or any other service requiring SSL certificates. It can also be used independent of any Puppet-defined service.
include certs
$cname = 'www.example.com'
certs::site { $cname:
ca_cert => true,
ca_name => 'caname',
ca_source_path => 'puppet:///ca_certs',
source_path => 'puppet:///site_certificates',
}
---
classes:
- certs
certs::sites:
'www.example.com':
ca_cert: true
ca_name: 'caname'
ca_source_path: 'puppet:///ca_certs'
source_path: 'puppet:///site_certificates'
Certs::Site<| |> -> Apache::Vhost<| |>
The following parameters are available in the certs::site
defined type:
ca_cert
ca_content
ca_ext
ca_name
ca_path
ca_source_path
cert_chain
cert_content
cert_dir_mode
cert_ext
cert_mode
cert_path
chain_content
chain_ext
chain_name
chain_path
chain_source_path
dhparam
dhparam_content
dhparam_dir
dhparam_file
ensure
group
key_content
key_dir_mode
key_ext
key_mode
key_path
merge_chain
merge_dhparam
merge_key
owner
service
source_cert_name
source_key_name
source_path
validate_x509
Data type: Boolean
Boolean for whether to look for a CA certificate file. Optional value. (default: false).
Default value: $::certs::ca_cert
Data type: Optional[String]
A string representing the contents of the CA file. Optional value. (default: undef).
Default value: $::certs::ca_content
Data type: String
The extension of the CA certificate file. Optional value. (default: 'crt').
Default value: $::certs::ca_ext
Data type: Optional[String]
The name of the CA certificate file. Optional value. (default: undef).
Default value: $::certs::ca_name
Data type: Stdlib::Absolutepath
Location where the CA certificate file will be stored on the managed node.
Optional value. (default: cert_path
).
Default value: $::certs::ca_path
Data type: Optional[String]
The location of the CA certificate file. Typically references a module's files.
e.g. puppet:///ca_certs
will search for the mount point defined in the
fileserver.conf on the Puppet Server for the specified files.
Optional value. (default: source_path
).
Default value: pick_default($::certs::ca_source_path, $source_path)
Data type: Boolean
Boolean for whether to look for a certificate chain file. Optional value. (default: false).
Default value: $::certs::cert_chain
Data type: Optional[String]
A string representing the contents of the certificate file. This can only be
provided if $source_path
is undefined or an error will occur.
Optional value. (default: undef).
Default value: $::certs::cert_content
Data type: String
Permissions of the certificate directory. Optional value. (default: '0755').
Default value: $::certs::cert_dir_mode
Data type: String
The extension of the certificate file. Optional value. (default: '.crt').
Default value: $::certs::cert_ext
Data type: String
Permissions of the certificate files. Optional value. (default: '0644').
Default value: $::certs::cert_mode
Data type: Stdlib::Absolutepath
Location where the certificate files will be stored on the managed node. Optional value. Defaults:
/etc/pki/tls/certs
on RedHat-based systems/etc/ssl/certs
on Debian-based and Suse-based systems/usr/local/etc/apache24
on FreeBSD-based systems/etc/ssl/apache2
on Gentoo-based systems
Default value: $::certs::cert_path
Data type: Optional[String]
A string representing the contents of the chain file. Optional value. (default: undef).
Default value: $::certs::chain_content
Data type: String
The extension of the certificate chain file. Optional value. (default: 'crt').
Default value: $::certs::chain_ext
Data type: Optional[String]
The name of the certificate chain file. Optional value. (default: undef).
Default value: $::certs::chain_name
Data type: Stdlib::Absolutepath
Location where the certificate chain file will be stored on the managed node.
Optional value. (default: $cert_path
).
Default value: $::certs::chain_path
Data type: Optional[String]
The location of the certificate chain file. Typically references a module's files.
e.g. puppet:///chain_certs
will search for the mount point defined in the
fileserver.conf on the Puppet Server for the specified files.
Optional value. (default: $source_path
).
Default value: pick_default($::certs::chain_source_path, $source_path)
Data type: Boolean
A boolean value to determine whether a dhparam file should be placed on the system along with the other certificate files. The dhparam file will need to exist on the source side just as with the other certificate files in order for the file to be delivered. Optional value. (default: false).
Default value: false
Data type: Optional[String]
A string representing the contents of the dhparam file. This option will take precedence over dhparam_file if it exists on the source side. Optional value. (default: undef).
Default value: undef
Data type: Optional[Stdlib::Absolutepath]
The directory in which the dhparam file should be placed.
Optional value. (default: $cert_path
).
Default value: undef
Data type: String
The name of the dhparam file. Optional value. (default: 'dh2048.pem').
Default value: $::certs::dhparam_file
Data type: Enum['present','absent']
Ensure for the site resources. If 'present', files will be put in place. If 'absent', files will be removed. Optional value. (default: 'present').
Default value: 'present'
Data type: String
Name of the group owner of the certificates. Optional value. Defaults:
root
for Redhat-based, Debian-based, and Suse-based systemswheel
for FreeBSD and Gentoo-based systems
Default value: $::certs::group
Data type: Optional[String]
A string representing the contents of the key file. This can only be
provided if $source_path
is undefined or an error will occur.
Optional value. (default: undef).
Default value: $::certs::key_content
Data type: String
Permissions of the private keys directory. Optional value. (default: '0755').
Default value: $::certs::key_dir_mode
Data type: String
The extension of the private key file. Optional value. (default: '.key').
Default value: $::certs::key_ext
Data type: String
Permissions of the private keys. Optional value. (default: '0600').
Default value: $::certs::key_mode
Data type: Stdlib::Absolutepath
Location where the private keys will be stored on the managed node. Optional value. Defaults:
/etc/pki/tls/private
on RedHat-based systems/etc/ssl/private
on Debian-based and Suse-based systems/usr/local/etc/apache24
on FreeBSD-based systems/etc/ssl/apache2
on Gentoo-based systems
Default value: $::certs::key_path
Data type: Boolean
Option to merge the CA and chain files into the actual certificate file, which is required by some software. Optional value. (default: false).
Default value: false
Data type: Boolean
Option to merge the DH paramaters file into the actual certificate file, which is required by some software. Optional value. (default: false).
Default value: false
Data type: Boolean
Option to merge the private into the actual certificate file, which is required by some software. Optional value. (default: false).
Default value: false
Data type: String
Name of the owner of the certificates. Optional value. (default: 'root').
Default value: $::certs::owner
Data type: Optional[Variant[Array[String],Boolean,String]]
Name of the server service(s) to notify when certificates are updated. Setting to false (or any Boolean) will disable service notifications. Optional value. Defaults:
httpd
for RedHat-based systemsapache2
for Debian-based, Suse-based, and Gentoo-based systemsapache24
for FreeBSD-based systems
Default value: $::certs::service
Data type: Optional[String]
The name of the source certificate file.
Optional value. (default: $namevar
).
Default value: undef
Data type: Optional[String]
The name of the source key file.
Optional value. (default: $namevar
).
Default value: undef
Data type: Optional[String]
The location of the certificate files. Typically references a module's files.
e.g. puppet:///site_certs
will search for the mount point defined in the
fileserver.conf on the Puppet Server for the specified files.
Default value: $::certs::source_path
Data type: Boolean
A boolean value to determine whether or not to validate the certificate and key pairs. Failure will cause the catalog to fail compilation. Optional value. (default: false).
Default value: $::certs::validate_x509