---

- name: restart php-fpm7@archwiki
  service: name=php-fpm7@{{ archwiki_user }} state=restarted

- name: run wiki updatescript
  command: php {{ archwiki_dir }}/public/maintenance/update.php --quick
  become: true
  become_user: "{{ archwiki_user }}"

# 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
