changeset 25:13adb555a7e2 puppet-3.6

Use "<IfVersion>" to handle auth differences between 2.2 and 2.4 Also, add Nano, because damnit vi!
author IBBoard <dev@ibboard.co.uk>
date Mon, 09 Mar 2015 00:58:19 +0000
parents 204330fea19a
children 58d1818c2ded
files manifests/templates.pp modules/website/files/zzz-custom.conf
diffstat 2 files changed, 18 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/manifests/templates.pp	Mon Mar 09 00:01:27 2015 +0000
+++ b/manifests/templates.pp	Mon Mar 09 00:58:19 2015 +0000
@@ -90,7 +90,7 @@
 }
 
 class tools {
-	$packages = [ 'sqlite', 'bash-completion' ]
+	$packages = [ 'sqlite', 'bash-completion', 'nano' ]
 	package { $packages:
 		ensure => latest;
 	}
@@ -269,7 +269,12 @@
 
 	# Common modules used by multiple sites (mod_auth_basic is safe because we HTTPS all the things)
 	apache::mod {
-		'auth_basic':; 'authn_file':; 'authz_user':; 'auth_token':;'deflate':;
+		'auth_basic':; 'authn_file':; 'authz_user':; 'auth_token':;'deflate':; 'version':;
+	}
+	if $operatingsystem == 'CentOS' and versioncmp($operatingsystemrelease, 7) >= 0 {
+		apache::mod { 
+			'authn_core':;
+		}
 	}
 	$apache_packages = [ 'mod_auth_token' ]
 	package { $apache_packages:
--- a/modules/website/files/zzz-custom.conf	Mon Mar 09 00:01:27 2015 +0000
+++ b/modules/website/files/zzz-custom.conf	Mon Mar 09 00:58:19 2015 +0000
@@ -43,12 +43,22 @@
 Header unset ETag
 FileETag None
 
+
 <Location /.hg/>
+    <IfVersion < 2.4>
         Order Allow,Deny
         Deny from all
+    </IfVersion>
+    <IfVersion >= 2.4>
+        Require all denied
+    </IfVersion>
 </Location>
 <FilesMatch ^\.>
+    <IfVersion < 2.4>
         Order Allow,Deny
         Deny from all
+    </IfVersion>
+    <IfVersion >= 2.4>
+        Require all denied
+    </IfVersion>
 </FilesMatch>
-