Files
puppet-oslo/manifests/service/ssl.pp
Takashi Kajinami 19862b0f18 Split oslo::service defined type
The oslo::service defined type was added a long ago but has never been
used by any other modules so far. The main blocker is that the type
manages not only common service parameters but also wsgi/ssl parameters
which are specific to api services.

This change splits the defined type to smaller modules so that we can
reuse the implementation.

Because the defined type is not used by any other modules at this
moment, and we don't expect direct usage of these resource type(*1),
this change is backword-incompatible.

(*1)
Technically it can be used but cause multiple conflicts.

Change-Id: If524155bf2d0dda964c6b451d7b26f36481514f5
2022-04-04 08:47:54 +09:00

53 lines
1.5 KiB
Puppet

# == Define: oslo::service::ssl
#
# Configure oslo_service options
#
# This resource configures ssl parameters of oslo.service library
#
# === Parameters:
#
# [*ca_file*]
# (optional) CA certificate file to use to verify connecting clients.
# (string value)
# Defaults to $::os_service_default.
#
# [*cert_file*]
# (optional) Certificate file to use when starting the server securely.
# (string value)
# Defaults to $::os_service_default.
#
# [*ciphers*]
# (optional) Sets the list of available ciphers. value should be a string
# in the OpenSSL cipher list format. (string value)
# Defaults to $::os_service_default.
#
# [*key_file*]
# (optional) Private key file to use when starting the server securely.
# (string value)
# Defaults to $::os_service_default.
#
# [*version*]
# (optional) SSL version to use (valid only if SSL enabled). Valid values are
# TLSv1 and SSLv23. SSLv2, SSLv3, TLSv1_1, and TLSv1_2 may be available on
# some distributions. (string value)
# Defaults to $::os_service_default.
#
define oslo::service::ssl (
$ca_file = $::os_service_default,
$cert_file = $::os_service_default,
$ciphers = $::os_service_default,
$key_file = $::os_service_default,
$version = $::os_service_default,
) {
$service_options = {
'ssl/ca_file' => { value => $ca_file },
'ssl/cert_file' => { value => $cert_file },
'ssl/ciphers' => { value => $ciphers },
'ssl/key_file' => { value => $key_file },
'ssl/version' => { value => $version },
}
create_resources($name, $service_options)
}