certmonger: Add dnsnames parameter to redis cert request

This adds the ability to add several SANs to the certificate as needed.

Change-Id: I245516257da280b91779313ffb18f84c8a4e3635
Related-Bug: #1818513
This commit is contained in:
Juan Antonio Osorio Robles
2019-03-05 10:15:29 +02:00
parent 32827b39c1
commit a3693d8594

View File

@@ -31,6 +31,12 @@
# (Optional) The CA that certmonger will use to generate the certificates.
# Defaults to hiera('certmonger_ca', 'local').
#
# [*dnsnames*]
# (Optional) The DNS names that will be added for the SubjectAltNames entry
# in the certificate. If left unset, the value will be set to the $hostname.
# This parameter can take both a string or an array of strings.
# Defaults to $hostname
#
# [*postsave_cmd*]
# (Optional) Specifies the command to execute after requesting a certificate.
# Defaults to undef.
@@ -44,6 +50,7 @@ class tripleo::certmonger::redis (
$service_certificate,
$service_key,
$certmonger_ca = hiera('certmonger_ca', 'local'),
$dnsnames = $hostname,
$postsave_cmd = undef,
$principal = undef,
) {
@@ -61,7 +68,7 @@ class tripleo::certmonger::redis (
certfile => $service_certificate,
keyfile => $service_key,
hostname => $hostname,
dnsname => $hostname,
dnsname => $dnsnames,
principal => $principal,
postsave_cmd => $postsave_cmd,
ca => $certmonger_ca,