diff options
-rw-r--r-- | modules/openssl/manifests/init.pp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/openssl/manifests/init.pp b/modules/openssl/manifests/init.pp index fb1f9239..74875bc2 100644 --- a/modules/openssl/manifests/init.pp +++ b/modules/openssl/manifests/init.pp @@ -1,8 +1,13 @@ class openssl { - define self_signed_cert($directory = '/etc/certs') { + class base { package { 'openssl': ensure => installed } + } + + define self_signed_cert($directory = '/etc/certs') { + include openssl::base + $pem_file = "$name.pem" exec { "openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout $pem_file -out $pem_file -subj '/CN=$name.$domain'": cwd => "$directory", |