Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Lysator
Puppet
Datorhandbok
Commits
8f93ce5b
Commit
8f93ce5b
authored
Feb 01, 2021
by
Hugo Hörnquist
Browse files
Update config.
parent
ed95af82
Changes
2
Hide whitespace changes
Inline
Side-by-side
manifests/init.pp
View file @
8f93ce5b
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,
...
...
templates/LocalSettings.php.e
rb
→
templates/LocalSettings.php.e
pp
View file @
8f93ce5b
<%- |
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;
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment