forked from ccchb/ansible
Hacky mediawiki role
This commit is contained in:
parent
1fb963e7fe
commit
c2ea9c6600
3 changed files with 150 additions and 0 deletions
23
roles/mediawiki/defaults/main.yml
Normal file
23
roles/mediawiki/defaults/main.yml
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
---
|
||||||
|
mediawiki_path: /var/www/wiki.ccchb.de/webroot/w
|
||||||
|
|
||||||
|
mediawiki_extensions:
|
||||||
|
- CategoryTree
|
||||||
|
- ParserFunctions
|
||||||
|
- PdfHandler
|
||||||
|
- Renameuser
|
||||||
|
- Interwiki
|
||||||
|
- ConfirmEdit
|
||||||
|
- ConfirmEdit/QuestyCaptcha
|
||||||
|
- WikiEditor
|
||||||
|
- MobileFrontend
|
||||||
|
|
||||||
|
mediawiki_skins:
|
||||||
|
- MonoBook
|
||||||
|
- Timeless
|
||||||
|
- Vector
|
||||||
|
- MinervaNeue
|
||||||
|
|
||||||
|
mediawiki_sitename: "CCC Bremen"
|
||||||
|
|
||||||
|
mediawiki_email: "webmaster@ccchb.de"
|
9
roles/mediawiki/tasks/main.yml
Normal file
9
roles/mediawiki/tasks/main.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
---
|
||||||
|
- name: Configure Mediawiki
|
||||||
|
template:
|
||||||
|
src: LocalSettings.php.j2
|
||||||
|
dest: "{{ mediawiki_path }}/LocalSettings.php"
|
||||||
|
owner: www-data
|
||||||
|
group: www-data
|
||||||
|
mode: '0600'
|
||||||
|
|
118
roles/mediawiki/templates/LocalSettings.php.j2
Normal file
118
roles/mediawiki/templates/LocalSettings.php.j2
Normal file
|
@ -0,0 +1,118 @@
|
||||||
|
<?php
|
||||||
|
## {{ ansible_managed }}
|
||||||
|
|
||||||
|
$wgSitename = "{{ mediawiki_sitename }}";
|
||||||
|
|
||||||
|
$wgScriptPath = "/w";
|
||||||
|
$wgArticlePath = "/wiki/$1";
|
||||||
|
$wgUsePathInfo = true;
|
||||||
|
|
||||||
|
$wgResourceBasePath = $wgScriptPath;
|
||||||
|
|
||||||
|
$wgEnableEmail = true;
|
||||||
|
$wgEnableUserEmail = true;
|
||||||
|
|
||||||
|
$wgEmergencyContact = "{{ mediawiki_email }}";
|
||||||
|
$wgPasswordSender = "{{ mediawiki_email }}";
|
||||||
|
|
||||||
|
## For a detailed description of the following switches see
|
||||||
|
## http://www.mediawiki.org/wiki/Extension:Email_notification
|
||||||
|
## and http://www.mediawiki.org/wiki/Extension:Email_notification
|
||||||
|
## There are many more options for fine tuning available see
|
||||||
|
## /includes/DefaultSettings.php
|
||||||
|
## UPO means: this is also a user preference option
|
||||||
|
$wgEnotifUserTalk = true; # UPO
|
||||||
|
$wgEnotifWatchlist = true; # UPO
|
||||||
|
$wgEmailAuthentication = true;
|
||||||
|
|
||||||
|
## Database secrets managed outside Ansible
|
||||||
|
require 'LocalSettings_secrets.php';
|
||||||
|
|
||||||
|
## Shared memory settings
|
||||||
|
$wgMainCacheType = CACHE_NONE;
|
||||||
|
$wgMemCachedServers = array();
|
||||||
|
|
||||||
|
## To enable image uploads, make sure the 'images' directory
|
||||||
|
## is writable, then set this to true:
|
||||||
|
$wgEnableUploads = true;
|
||||||
|
$wgUseImageMagick = true;
|
||||||
|
$wgImageMagickConvertCommand = "/usr/bin/convert";
|
||||||
|
|
||||||
|
## If you want to use image uploads under safe mode,
|
||||||
|
## create the directories images/archive, images/thumb and
|
||||||
|
## images/temp, and make them all writable. Then uncomment
|
||||||
|
## this, if it's not already uncommented:
|
||||||
|
# $wgHashedUploadDirectory = false;
|
||||||
|
|
||||||
|
# to work with safe mode (as by https://www.mediawiki.org/wiki/Safe_mode)
|
||||||
|
# $wgFileStore['deleted']['hash'] = 0;
|
||||||
|
# $wgLocaltimezone = "Europe/Berlin";
|
||||||
|
# generate Thumbs on _every_ client request (NOTE this is a bad idea)
|
||||||
|
# $wgThumbnailScriptPath = "{$wgScriptPath}/thumb.php";
|
||||||
|
|
||||||
|
## If you have the appropriate support software installed
|
||||||
|
## you can enable inline LaTeX equations:
|
||||||
|
$wgUseTeX = false;
|
||||||
|
|
||||||
|
$wgLocalInterwiki = $wgSitename;
|
||||||
|
|
||||||
|
$wgLanguageCode = "de";
|
||||||
|
|
||||||
|
$wgProxyKey = "1a38e7ff4293744d5fe304b95f3360d05790c8353b153ab147587a4a72d9fa34";
|
||||||
|
$wgSecretKey = $wgProxyKey;
|
||||||
|
|
||||||
|
## Default skin: you can change the default skin. Use the internal symbolic
|
||||||
|
## names, ie 'standard', 'nostalgia', 'cologneblue', 'monobook':
|
||||||
|
$wgDefaultSkin = 'vector';
|
||||||
|
$wgLogo = '/w/images/3/3b/Ccchb_wiki.png';
|
||||||
|
|
||||||
|
## For attaching licensing metadata to pages, and displaying an
|
||||||
|
## appropriate copyright notice / icon. GNU Free Documentation
|
||||||
|
## License and Creative Commons licenses are supported so far.
|
||||||
|
$wgEnableCreativeCommonsRdf = true;
|
||||||
|
$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
|
||||||
|
$wgRightsUrl = "http://www.gnu.org/copyleft/fdl.html";
|
||||||
|
$wgRightsText = "GNU Free Documentation License 1.2";
|
||||||
|
$wgRightsIcon = "${wgScriptPath}/skins/common/images/gnu-fdl.png";
|
||||||
|
# $wgRightsCode = "gfdl"; # Not yet used
|
||||||
|
|
||||||
|
$wgFileExtensions = [ 'png', 'gif', 'jpg', 'jpeg', 'webp', 'svg', 'pdf', 'ai' ];
|
||||||
|
|
||||||
|
{% for extension in mediawiki_extensions %}
|
||||||
|
wfLoadExtension( "{{ extension }}" );
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% for skin in mediawiki_skins %}
|
||||||
|
wfLoadSkin( "{{ skin }}" );
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
$wgServer = "https://wiki.ccchb.de";
|
||||||
|
|
||||||
|
$wgNamespacesWithSubpages[NS_MAIN] = true;
|
||||||
|
|
||||||
|
$wgMFDefaultSkinClass = 'SkinMinerva';
|
||||||
|
|
||||||
|
$wgDiff3 = "/usr/bin/diff3";
|
||||||
|
|
||||||
|
$wgSVGConverter = 'rsvg';
|
||||||
|
|
||||||
|
$wgRestrictionLevels[] = 'legal';
|
||||||
|
|
||||||
|
$wgGroupPermissions['*']['edit'] = false;
|
||||||
|
$wgGroupPermissions['user']['writeapi'] = true;
|
||||||
|
$wgGroupPermissions['vorstand']['legal'] = true;
|
||||||
|
|
||||||
|
$wgCaptchaClass = 'QuestyCaptcha';
|
||||||
|
|
||||||
|
$wgCaptchaQuestions[] = array( 'question' => 'Die Antwort auf die Frage nach dem Leben, dem Universum und allem?', 'answer' => '42' );
|
||||||
|
$wgCaptchaQuestions[] = array( 'question' => 'Wie lautet der Kurzname dieses Vereins?', 'answer' => 'CCCHB' );
|
||||||
|
$wgCaptchaQuestions[] = array( 'question' => 'Gib einfach das Wort Passion ein (kleingeschrieben):', 'answer' => 'passion' );
|
||||||
|
$wgCaptchaQuestions[] = array( 'question' => 'Gib bitte Fünfhundertsiebenundsechzig als Zahl ein:', 'answer' => '567' );
|
||||||
|
$wgCaptchaQuestions[] = array( 'question' => 'An welchem Wochentag treffen wir uns regelmäßig?', 'answer' => 'Dienstag' );
|
||||||
|
$wgCaptchaQuestions[] = array( 'question' => 'Der erste Congress im CCH (2012)', 'answer' => '29c3' );
|
||||||
|
$wgCaptchaQuestions[] = array( 'question' => 'Der letzte Congress im bcc (2011)', 'answer' => '28c3' );
|
||||||
|
$wgCaptchaQuestions[] = array( 'question' => 'Wie kürzt man Erfahrungsaustauschkreis in 4 Buchstaben ab? (alles großgeschrieben)', 'answer' => 'ERFA' );
|
||||||
|
|
||||||
|
$wgShowExceptionDetails = true;
|
||||||
|
$wgShowDBErrorBacktrace = true;
|
||||||
|
|
Loading…
Reference in a new issue