49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
# File 'manifests/init.pp', line 49
class openssl (
Stdlib::Absolutepath $cert_source_directory,
Stdlib::Absolutepath $default_key_dir,
Stdlib::Absolutepath $default_cert_dir,
String $package_name,
String $package_ensure,
String $root_group,
Array[String] $ca_certs,
) {
package { 'openssl':
ensure => $package_ensure,
name => $package_name,
}
if ($facts['os']['family'] == 'Debian') {
exec { 'openssl::update-ca-certificates':
command => 'update-ca-certificates',
user => 'root',
cwd => '/',
path => ['/usr/bin', '/bin', '/usr/sbin', '/sbin',],
refreshonly => true,
}
}
elsif ($facts['os']['family'] == 'RedHat') {
exec { 'openssl::update-ca-trust':
command => 'update-ca-trust extract',
user => 'root',
cwd => '/',
path => ['/usr/bin', '/bin', '/usr/sbin', '/sbin',],
refreshonly => true,
}
}
unless empty($ca_certs) {
openssl::cacert { $ca_certs: }
}
}
|