1
1
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2025-01-18 08:06:16 +01:00
infrastructure/roles/archwiki/handlers/main.yml
Christian Heusel 107e788f2a
archwiki: Update to version 1.40.1
- fix crash when $wgFooterIcons.poweredby is no set
- account for Extension:Renameuser being bundeled with 1.40
- enable the nosniff header for /images
- switch to running maintenance scripts via run.php

Signed-off-by: Christian Heusel <christian@heusel.eu>
2023-10-01 21:52:16 +02:00

28 lines
1.3 KiB
YAML

- name: Restart php-fpm@archwiki
service: name=php-fpm@{{ archwiki_user }} state=restarted
- name: Run wiki updatescript # noqa no-changed-when
command: php {{ archwiki_dir }}/public/maintenance/run.php update --quick
become: true
become_user: "{{ archwiki_user }}"
- name: Restart archwiki-runjobs-wait
service: name=archwiki-runjobs-wait state=restarted
# The nginx proxy/fastcgi cache can be cleared by simply deleting all files in
# the cache directory. It is important to keep the directory tree intact,
# otherwise nginx will spit errors into the log until it is restarted (even
# reload is not enough).
# reference: https://stackoverflow.com/a/6896903
- name: Purge nginx cache # noqa no-changed-when
command: find /var/lib/nginx/cache -type f -delete
# The MediaWiki file cache can be invalidated by deleting the files in the
# cache, by setting $wgCacheEpoch to the current time, or by touching the
# LocalSettings.php file (thanks to $wgInvalidateCacheOnLocalSettingsChange
# being set to true). References:
# - https://www.mediawiki.org/wiki/Manual:File_cache
# - https://www.mediawiki.org/wiki/Manual:$wgInvalidateCacheOnLocalSettingsChange
- name: Invalidate MediaWiki file cache
file: path="{{ archwiki_dir }}/public/LocalSettings.php" state=touch owner=archwiki group=archwiki mode=0640