changeset 157:c6b1b42f3e4b puppet-3.6

Move all sites to separate LetsEncrypt certs to make adding future domains easier
author IBBoard <dev@ibboard.co.uk>
date Thu, 30 Mar 2017 20:41:18 +0100
parents 9cf4ebd6d2ba
children 13f937ea8e3e
files manifests/templates.pp
diffstat 1 files changed, 21 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/manifests/templates.pp	Tue Mar 28 21:12:49 2017 +0100
+++ b/manifests/templates.pp	Thu Mar 30 20:41:18 2017 +0100
@@ -486,6 +486,7 @@
 	include adminsite
 	website::https::multitld { 'www.ibboard':
 		custom_fragment => template("private/apache/ibboard.fragment"),
+		letsencrypt_name => 'ibboard.co.uk',
 	}
 	include hiveworldterrasite
 	include glittergothsite
@@ -494,10 +495,12 @@
 	website::https::multitld { 'www.abiknight':
 		custom_fragment => "$website::htmlphpfragment
 	ErrorDocument 404 /error.php",
+		letsencrypt_name => 'abiknight.co.uk',
 	}
 	website::https::multitld { 'www.gracebertram':
 		main_tld => 'com',
 		extra_tlds => [ 'co.uk' ],
+		letsencrypt_name => 'gracebertram.co.uk',
 		docroot_owner => $defaultusers::secondary_user,
 		docroot_group => 'editors',
 		custom_fragment => template("private/apache/gracebertram.fragment"),
@@ -507,6 +510,7 @@
 		docroot_owner => $defaultusers::secondary_user,
 		docroot_group => 'editors',
 		serveraliases => 'realmrunner.com',
+		letsencrypt_name => 'realmrunner.com',
 		custom_fragment => template("private/apache/realmrunner.fragment"),
 	}
 	include webmailpimsite
@@ -546,17 +550,21 @@
 class hiveworldterrasite {
 	website::https::multitld { 'www.hiveworldterra':
 		force_no_www => false,
+		letsencrypt_name => 'hiveworldterra.co.uk',
 		custom_fragment => template("private/apache/hwt.fragment"),
 	}
 	website::https::multitld { 'forums.hiveworldterra': 
+		letsencrypt_name => 'hiveworldterra.co.uk',
 		custom_fragment => template("private/apache/forums.fragment"),
 	}
 	website::https::multitld { 'skins.hiveworldterra':
+		letsencrypt_name => 'hiveworldterra.co.uk',
 		custom_fragment => template("private/apache/skins.fragment"),
 	}
 	website::https::redir { 'hiveworldterra.ibboard.co.uk':
 		redir => 'https://www.hiveworldterra.co.uk/',
 		docroot => "${website::basedir}/hiveworldterra",
+		letsencrypt_name => 'hiveworldterra.co.uk',
 		separate_log => true,
 	}
 }
@@ -564,20 +572,21 @@
 	website::https::multitld { 'www.bdstrike': 
 		docroot_owner => $defaultusers::secondary_user,
 		docroot_group => 'editors',
+		letsencrypt_name => 'bdstrike.co.uk',
 	}
-	website::https::multitldredir { 'www.strikecreations.co.uk':
-		main_domain => 'bdstrike.co.uk',
+	$aliases = [
+		'strikecreations.co.uk',
+		'strikecreations.com',
+		'www.strikecreations.com' ]
+
+	website::https::redir { 'www.strikecreations.co.uk':
+		redir => 'https://bdstrike.co.uk/',
+		serveraliases => $aliases,
 		docroot => "${website::basedir}/bdstrike",
 		docroot_owner => $defaultusers::secondary_user,
 		docroot_group => 'editors',
-#		separate_log => true,
-	}
-	website::https::multitldredir { 'www.strikecreations.com':
-		main_domain => 'bdstrike.co.uk',
-		docroot => "${website::basedir}/bdstrike",
-		docroot_owner => $defaultusers::secondary_user,
-		docroot_group => 'editors',
-#		separate_log => true,
+		letsencrypt_name => 'bdstrike.co.uk',
+		separate_log => true,
 	}
 }
 class devsite {
@@ -600,12 +609,14 @@
 	}
 
 	website::https::multitld { 'www.warfoundry':
+		letsencrypt_name => 'warfoundry.co.uk',
 		custom_fragment => template("private/apache/warfoundry.fragment"),
 	}
 	website::https::multitld { 'dev.ibboard':
 		#Make sure we're the first one hit for the tiny fraction of "no support" cases we care about (potentially Python for Mercurial!)
 		# http://en.wikipedia.org/wiki/Server_Name_Indication#No_support
 		priority => 1,
+		letsencrypt_name => 'dev.ibboard.co.uk',
 		custom_fragment => template("private/apache/dev.fragment"),
 		force_no_index => false,
 	}