Files
puppet-vswitch/manifests/pki/cert.pp
Takashi Kajinami c46b0710a6 Prepare for voxpupuli-puppet-lint-plugins
Fix new lint errors detected when full of the voxpupili lint plugins
are enabled.

Change-Id: If7634f12d8cd965784791f60515e8b16532ec1e3
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2025-08-19 22:22:51 +09:00

27 lines
689 B
Puppet

# == define: vswitch::pki::cert
#
# Generate certificate
#
# == Parameters:
#
# [*cert_dir*]
# (Optional) The directory in which the cert files are generated.
# Defaults to '/etc/openvswitch'
#
define vswitch::pki::cert (
Stdlib::Absolutepath $cert_dir = '/etc/openvswitch',
) {
exec { "ovs-req-and-sign-cert-${name}":
command => ['ovs-pki', 'req+sign', $name],
cwd => $cert_dir,
creates => "${cert_dir}/${name}-cert.pem",
path => ['/usr/sbin', '/sbin', '/usr/bin', '/bin'],
}
Package<| title == 'openvswitch' |>
-> Exec["ovs-req-and-sign-cert-${name}"]
Exec<| title == 'ovs-pki-init-ca-authority' |>
-> Exec["ovs-req-and-sign-cert-${name}"]
}