Files
infrastructure/roles/archwiki/handlers/main.yml
Sven-Hendrik Haase 7c1c379bdf archwiki: Add memcached@archwiki handler
We didn't restart memcached on changed config before.
2025-03-22 03:49:22 +01:00

31 lines
1.4 KiB
YAML

- name: Restart php-fpm@archwiki
service: name=php-fpm@{{ archwiki_user }} state=restarted
- name: Restart memcached@archwiki
service: name=memcached@{{ 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