1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 11:42:08 +00:00
iiab/roles/kiwix/tasks/nginx.yml

17 lines
616 B
YAML
Raw Normal View History

- name: Enable http://box{{ kiwix_url }} via NGINX, by installing {{ nginx_conf_dir }}/kiwix-nginx.conf from template # http://box/kiwix
2020-02-14 01:31:34 +00:00
template:
src: kiwix-nginx.conf.j2
dest: "{{ nginx_conf_dir }}/kiwix-nginx.conf" # /etc/nginx/conf.d
when: kiwix_enabled
2020-02-14 01:31:34 +00:00
- name: Disable http://box{{ kiwix_url }} via NGINX, by removing {{ nginx_conf_dir }}/kiwix-nginx.conf # http://box/kiwix
2020-02-14 01:31:34 +00:00
file:
path: "{{ nginx_conf_dir }}/kiwix-nginx.conf" # /etc/nginx/conf.d
2020-02-14 01:31:34 +00:00
state: absent
when: not kiwix_enabled
2020-02-14 01:31:34 +00:00
- name: Restart 'nginx' systemd service
systemd:
name: nginx
state: restarted