# (Optional) The user which the certificate and key files belong to.
# Defaults to 'root'
#
+# [*postsave_cmd*]
+# (Optional) Specifies the command to execute after requesting a certificate.
+# If nothing is given, it will default to: "systemctl reload ${service name}"
+# Defaults to undef.
+#
# [*principal*]
# (Optional) The service principal that is set for the service in kerberos.
# Defaults to undef
$service_certificate,
$service_key,
$certmonger_ca = hiera('certmonger_ca', 'local'),
+ $postsave_cmd = undef,
$principal = undef,
) {
include ::certmonger
include ::nova::params
- $postsave_cmd = "systemctl restart ${::nova::params::libvirt_service_name}"
+ $postsave_cmd_real = pick($postsave_cmd, "systemctl reload ${::nova::params::libvirt_service_name}")
certmonger_certificate { $name :
ensure => 'present',
certfile => $service_certificate,
hostname => $hostname,
dnsname => $hostname,
principal => $principal,
- postsave_cmd => $postsave_cmd,
+ postsave_cmd => $postsave_cmd_real,
ca => $certmonger_ca,
wait => true,
tag => 'libvirt-cert',
# it will create.
# Defaults to hiera('libvirt_certificates_specs', {}).
#
+# [*libvirt_postsave_cmd*]
+# (Optional) If set, it overrides the default way to restart libvirt when the
+# certificate is renewed.
+# Defaults to undef
+#
# [*mongodb_certificate_specs*]
# (Optional) The specifications to give to certmonger for the certificate(s)
# it will create.
$haproxy_certificates_specs = hiera('tripleo::profile::base::haproxy::certificates_specs', {}),
$haproxy_postsave_cmd = undef,
$libvirt_certificates_specs = hiera('libvirt_certificates_specs', {}),
+ $libvirt_postsave_cmd = undef,
$mongodb_certificate_specs = hiera('mongodb_certificate_specs',{}),
$mysql_certificate_specs = hiera('tripleo::profile::base::database::mysql::certificate_specs', {}),
$rabbitmq_certificate_specs = hiera('tripleo::profile::base::rabbitmq::certificate_specs', {}),
}
unless empty($libvirt_certificates_specs) {
include ::tripleo::certmonger::libvirt_dirs
- ensure_resources('tripleo::certmonger::libvirt', $libvirt_certificates_specs)
+ ensure_resources('tripleo::certmonger::libvirt', $libvirt_certificates_specs,
+ {'postsave_cmd' => $libvirt_postsave_cmd})
}
unless empty($haproxy_certificates_specs) {
include ::tripleo::certmonger::haproxy_dirs