summaryrefslogtreecommitdiff
path: root/manifests/cert.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/cert.pp')
-rw-r--r--manifests/cert.pp20
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"] ],
+ }
+}