summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/site.pp16
-rw-r--r--manifests/site/config.pp11
2 files changed, 16 insertions, 11 deletions
diff --git a/manifests/site.pp b/manifests/site.pp
index f73ae30..851d471 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -5,28 +5,32 @@ define nginx::site(
$certbot = true,
$template = 'site',
$backend = 'weblocal',
+ $aliases = "*.${name}",
) {
nginx::site::config { $name:
ensure => $ensure,
source => $source,
template => $template,
backend => $backend,
+ aliases => $aliases,
}
if $certbot == true {
certbot::manage { $name:
+ aliases => $aliases,
pre_hook => '/usr/sbin/service nginx restart',
require => Nginx::Site::Config[$name],
}
}
nginx::site::config { "${name}-ssl":
- use_fqdn => $name,
- ensure => $ssl,
- source => $source,
- template => "${template}-ssl",
- backend => $backend,
- require => $certbot ? {
+ server_name => $name,
+ ensure => $ssl,
+ source => $source,
+ template => "${template}-ssl",
+ backend => $backend,
+ aliases => $aliases,
+ require => $certbot ? {
true => Certbot::Manage[$name],
default => undef,
}
diff --git a/manifests/site/config.pp b/manifests/site/config.pp
index 4bea495..ff8187e 100644
--- a/manifests/site/config.pp
+++ b/manifests/site/config.pp
@@ -1,9 +1,10 @@
define nginx::site::config(
- $use_fqdn = $name,
- $ensure = present,
- $source = 'template',
- $template = 'site',
- $backend = 'weblocal',
+ $server_name = $name,
+ $ensure = present,
+ $source = 'template',
+ $template = 'site',
+ $backend = 'weblocal',
+ $aliases = "*.${name}",
){
case $source {
'file': {