Commit graph

34 commits

Author SHA1 Message Date
Jakub Klinkovský 6875bbb8e1 archwiki: clean up old task 2021-10-02 01:01:52 +00:00
Jakub Klinkovský a0f5a42e90 archwiki: ensure that MediaWiki file cache is invalidated on each MediaWiki update
We've hit this problem at least twice in the past, last time with the new
Vector skin update. With this change it should not be necessary to do
anything manually after an update.
2021-10-02 01:01:52 +00:00
Jelle van der Waa d6320b7548
Switch the archwiki to PHP 7
As mediawiki does not support PHP 8 yet in the current LTS release, we
have to stay with PHP 7.
2021-02-19 18:28:14 +01:00
Kristian Klausen 4112bdf9fd Make ansible-lint happy
yaml: truthy value should be one of [false, true] (truthy)
yaml: wrong indentation: expected 4 but found 2 (indentation)
yaml: too few spaces before comment (comments)
yaml: missing starting space in comment (comments)
yaml: too many blank lines (1 > 0) (empty-lines)
yaml: too many spaces after colon (colons)
yaml: comment not indented like content (comments-indentation)
yaml: no new line character at the end of file (new-line-at-end-of-file)
load-failure: Failed to load or parse file
parser-error: couldn't resolve module/action 'hosts'. This often indicates a misspelling, missing collection, or incorrect module path.
2021-02-14 14:22:05 +01:00
Kristian Klausen 2d152700b6 Move certificate issuing to its own role to ease maintenance
It should make it easier to change how the certificates is issued.
Ex: If we want to switch to ECDSA certificates in the future or replace
certbot with something else.
2021-01-10 20:03:11 +01:00
Jakub Klinkovský e95f22a17a roles/archwiki: purge the nginx cache after pulling from the archwiki git repo 2020-11-21 19:11:02 +00:00
Jakub Klinkovský 7db1af01ae
archwiki: fix directory permissions
- home directory needs 751 - nginx accesses it to serve static files
- cache and sessions directories are used only by PHP -> 750
- uploads is public -> 755

Note that the "fix home permissions" task was duplicated. Other tasks
fixing permissions were moved above.
2020-09-05 21:42:30 +02:00
Jakub Klinkovský c96e8b912a
nginx: move fastcgi cache to /var/lib/nginx 2020-09-05 21:27:21 +02:00
Frederik Schwan 63887d3b09 fix E208 'File permissions not mentioned' 2020-08-27 05:29:00 +00:00
Frederik Schwan 274a3b601c
fix ansible-lint errors introduced while rebasing 2020-06-17 02:43:13 +02:00
Frederik Schwan a4a4f3e76c
fix E303 'Using command rather than module'
also use systemd instead of service module
2020-06-17 02:43:12 +02:00
Frederik Schwan 2b2bd06512
fix E206 'Variables should have spaces before and after: {{ var_name }}' 2020-06-12 22:20:48 +02:00
Jelle van der Waa 8391c7d514
Remove "failed" fail2ban rules
This was an attempt to block too many requests from bots but it leads to
an increase of cpu usage and blocking wiki administrators.
2020-05-22 13:42:10 +02:00
Phillip Smith 220cb8c80b make archwiki role depend on fail2ban role so we can reuse handlers 2019-11-06 11:52:49 +11:00
Jelle van der Waa cbf08f75fc archwiki: install pamcan updater hook 2019-11-04 17:21:06 +01:00
Phillip Smith 61d48f1173 implement fail2ban role and deploy to orion
fail2ban role now protects postfix, dovecot and sshd. other roles can drop
configuration files into /etc/fail2ban/jail.d/*.local to enable fail2ban to
monitor it's service.
2019-10-25 16:46:09 +11:00
Jelle van der Waa 04fe028c5a archwiki: enable memcached by default and make ram configurable
Introduce a variable to set the memcached memory size.
2019-10-09 13:01:22 +02:00
Giancarlo Razzolini ee7a0aa054
roles/archwiki: Plug in the maintenance role 2019-09-24 23:03:49 -03:00
Jelle van der Waa 9169d99993 archwiki: use memcached for caching
Switch from apcu caching to memcached with 512 MiB so that we have a
sustained cached instead of a php-fpm worker based cache which has a
shorter lifetime of 2000 requests before the worker get's killed and
respawned.
2019-09-24 12:39:24 +02:00
Jelle van der Waa a4ce471fde archwiki: add apcu caching to the archwiki
With apcu caching the wiki get's ~ 40 req/s more and the latency of the
wiki lowers.
2019-09-15 18:33:08 +02:00
Jelle van der Waa 78a21b881f archwiki: add robots.txt for mediawiki 2019-09-12 22:33:49 +02:00
Florian Pritz 0bf85de82b archwiki: Automatically update registration question when pacman package is updated
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2019-01-15 15:22:10 +01:00
Florian Pritz 67a1b894f7 archwiki: Use loop instead of multiple tasks for systemd units
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2019-01-15 15:22:10 +01:00
Florian Pritz 87dc6a864d
archwiki: Enable debug logging for bounce handler
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-08-05 12:31:19 +02:00
Florian Pritz 3ebeffe6d0 Improve group vars vault usage for archwiki
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-06-07 12:11:06 +02:00
Florian Pritz 9e655f8012 Improve group vars vault usage for mariadb 2018-06-07 12:11:06 +02:00
Florian Pritz 9dc3210259
archwiki: Deploy TitleKey extension
This requires the update script to be run so add a handler for it.

Signed-off-by: Florian Pritz <bluewind@xinu.at>
2018-03-07 12:02:02 +01:00
Giancarlo Razzolini 3d54465fab
Added the repository and version as variables
Make the role fully idempotent by pinning the version and also use a variable
for setting the repository.
2018-03-02 20:11:37 -03:00
Giancarlo Razzolini 6d7a4dd122
Added the missing php-intl package
The intl package is required for mediawiki.
2018-03-02 19:53:10 -03:00
Giancarlo Razzolini 0bed3492b8
Add the certbot command and install the services and timers
Added the certbot command to create the certificate on the first run of the role.
Also install the archwiki-runjobs, archwiki-prune-cache service and timers and the
archwiki-runjobs-wait service. Enable the timers and start them as well as the runjobs-wait
service.
2018-03-02 19:46:04 -03:00
Giancarlo Razzolini 5171ebbb37
Add the permission fix for the cache, sessions and uploads directories
Create the required directories on the first run of the role and make sure they
keep the required permissions.
2018-03-02 18:14:00 -03:00
Giancarlo Razzolini cfab885582
Tag nginx configs in roles as nginx 2018-03-02 18:14:00 -03:00
Giancarlo Razzolini 50cd99055f
roles/archwiki: Add a task to configure the wiki
Deploy LocalSettings.php with the changes required to run archwiki.
2018-03-02 18:14:00 -03:00
Giancarlo Razzolini 9e2d11dbb7
roles/archwiki: Add the tasks main file
Add the tasks that create the archwiki user, clone the repo, create the db
and the db user and also configure the php-fpm daemon.
2018-03-02 18:13:59 -03:00