Commit 8f93ce5b authored by Hugo Hörnquist's avatar Hugo Hörnquist
Browse files

Update config.

parent ed95af82
class datorhandbok {
class datorhandbok (
$mysql_password = undef, # hiera
) {
ensure_packages([
'apache2',
'default-mysql-server',
......@@ -121,16 +124,14 @@ class datorhandbok {
notify => Service['apache2'],
}
# TODO the file requires @pupsecrets.
# reenable once figured out
# file { '/etc/mediawiki/LocalSettings.php':
# ensure => file,
# owner => root,
# group => www-data,
# mode => '0440',
# content => template("datorhandbok/LocalSettings.php.erb"),
# require => Package['mediawiki'],
# }
file { '/etc/mediawiki/LocalSettings.php':
ensure => file,
owner => root,
group => www-data,
mode => '0440',
content => epp('datorhandbok/LocalSettings.php', { 'mysql_password' => Sensative($mysql_password)),
require => Package['mediawiki'],
}
file { '/var/lib/mediawiki/skins/lyslogo-liten.png':
ensure => file,
......
<%- |
String %mysql_password,
| -%>
<?php
# This file was automatically generated by the MediaWiki installer.
......@@ -59,7 +62,7 @@ $wgEmailAuthentication = false;
$wgDBserver = "localhost";
$wgDBname = "datorhandbok";
$wgDBuser = "datorhandbok";
$wgDBpassword = "<%= import(@pupsecrets + "/mediawiki_mysql") %>";
$wgDBpassword = "<%= $mysql_password %>";
$wgDBprefix = "";
# If you're on MySQL 3.x, this next line must be FALSE:
......@@ -98,7 +101,7 @@ $wgLocalInterwiki = $wgSitename;
$wgLanguageCode = "sv";
$wgSecretKey = "<%= import(@pupsecrets + "/mediawiki_mysql") %>";
$wgSecretKey = "<%= $mysql_password %>";
## Default skin: you can change the default skin. Use the internal symbolic
## names, ie 'standard', 'nostalgia', 'cologneblue', 'monobook':
......@@ -153,10 +156,8 @@ $wgGroupPermissions['root']['rollback'] = true;
$wgGroupPermissions['root']['upload'] = true;
$wgGroupPermissions['root']['userrights'] = true;
## Autentisera mot PAM
require_once("extensions/AuthPAM.php");
$wgAuth = new AuthPAM();
## Autentisera mot CAS
requince_once('extensions/CASAuth/CASAuth.php');
## Visa tiden i Sveriges tidszon.
......@@ -166,3 +167,4 @@ $wgLocalTZoffset = date("Z") / 3600;
#$wgReadOnly = "Systemunderhll pgr, Datorhandboken skrivskyddad!";
//$wgShowExceptionDetails = true;
//$wgShowDBErrorBacktrace = true;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment