summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/site.pp24
1 files changed, 15 insertions, 9 deletions
diff --git a/manifests/site.pp b/manifests/site.pp
index 760b441..7377f18 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1,12 +1,16 @@
define nginx::site(
- $ensure = present,
- $ssl = present,
- $source = 'file',
- $certbot = true
+ $ensure = present,
+ $ssl = present,
+ $source = 'file',
+ $certbot = true
+ $template = 'site',
+ $backend = 'weblocal',
) {
nginx::site::config { $name:
- ensure => $ensure,
- source => $source,
+ ensure => $ensure,
+ source => $source,
+ template => $template,
+ backend => $backend,
}
if $certbot == true {
@@ -17,9 +21,11 @@ define nginx::site(
}
nginx::site::config { "${name}-ssl":
- ensure => $ssl,
- source => $source,
- require => $certbot ? {
+ ensure => $ssl,
+ source => $source,
+ template => "${template}-ssl",
+ backend => $backend,
+ require => $certbot ? {
true => Certbot::Manage[$name],
default => undef,
}