- name: Enable http://box{{ mediawiki_url }} & http://box{{ mediawiki_url2 }} via NGINX, by installing {{ nginx_conf_dir }}/mediawiki-nginx.conf from template    # http://box/wiki & http://box/mediawiki
  template:
    src: mediawiki-nginx.conf.j2
    dest: "{{ nginx_conf_dir }}/mediawiki-nginx.conf"    # /etc/nginx.conf.d
  when: mediawiki_enabled

- name: Disable http://box{{ mediawiki_url }} & http://box{{ mediawiki_url2 }} via NGINX, by removing {{ nginx_conf_dir }}/mediawiki-nginx.conf    # http://box/wiki & http://box/mediawiki
  file:
    path: "{{ nginx_conf_dir }}/mediawiki-nginx.conf"    # /etc/nginx.conf.d
    state: absent
  when: not mediawiki_enabled

- name: Restart 'nginx' systemd service
  systemd:
    name: nginx
    state: restarted
