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
Evangelos Foutras 51c14ddaf4
archwiki: restart archwiki-runjobs-wait on upgrade
This fixes the unexpanded magic words in mails that we sometimes see.
2022-12-22 21:29:33 +02:00

28 lines
1.2 KiB
YAML

- name: Restart php-fpm@archwiki
service: name=php-fpm@{{ archwiki_user }} state=restarted
- name: Run wiki updatescript
command: php {{ archwiki_dir }}/public/maintenance/update.php --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
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