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
2020-02-13 20:31:34 -05:00

17 lines
591 B
YAML

- name: Enable http://box{{ kiwix_url }} via NGINX, by installing {{ nginx_conf_dir }}/kiwix-nginx.conf from template
template:
src: kiwix-nginx.conf.j2
dest: "{{ nginx_conf_dir }}/kiwix-nginx.conf"
when: nginx_install and kiwix_enabled
- name: Disable http://box{{ kiwix_url }} via NGINX, by removing {{ nginx_conf_dir }}/kiwix-nginx.conf
file:
path: "{{ nginx_conf_dir }}/kiwix-nginx.conf"
state: absent
when: nginx_install and not kiwix_enabled
- name: Restart 'nginx' systemd service
systemd:
name: nginx
state: restarted
when: nginx_enabled | bool