diff options
Diffstat (limited to 'manifests/cert.pp')
-rw-r--r-- | manifests/cert.pp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/manifests/cert.pp b/manifests/cert.pp new file mode 100644 index 0000000..81a5f4b --- /dev/null +++ b/manifests/cert.pp @@ -0,0 +1,20 @@ +define nginx::cert( + $address +) +{ + ssl::cert { "$address": + main => true, + notify => Service['nginx'], + } + + ssl::check { "$address": + file => true, + } + + Service["nginx"] { + require => [ Package["nginx"], + File["/etc/nginx/sites-enabled/${address}"], + File["/etc/ssl/private/${address}.pem"], + File["/etc/ssl/certs/${address}.crt"] ], + } +} |