1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 03:32:12 +00:00

Update kiwix/tasks/enable.yml

This commit is contained in:
A Holt 2020-01-11 17:01:20 -05:00 committed by GitHub
parent 6304ebc6d5
commit 2159797985
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,7 +6,7 @@
state: restarted
when: kiwix_enabled | bool
- name: Disable 'kiwix-serve' systemd service
- name: Disable & Stop 'kiwix-serve' systemd service
systemd:
name: kiwix-serve
enabled: no
@ -36,11 +36,11 @@
# Apache
- name: "Enable http://box{{ kiwix_url_without_slash }} via Apache"
- name: Enable http://box{{ kiwix_url_without_slash }} via Apache
command: a2ensite kiwix.conf
when: apache_install and kiwix_enabled
- name: "Disable http://box{{ kiwix_url_without_slash }} via Apache"
- name: Disable http://box{{ kiwix_url_without_slash }} via Apache
command: a2dissite kiwix.conf
when: apache_install and not kiwix_enabled
@ -53,16 +53,13 @@
# NGINX
- name: "Enable http://box{{ kiwix_url_without_slash }} via NGINX, by installing {{ nginx_config_dir }}/kiwix-nginx.conf from template"
- name: Enable http://box{{ kiwix_url_without_slash }} via NGINX, by installing {{ nginx_config_dir }}/kiwix-nginx.conf from template
template:
src: kiwix-nginx.conf
dest: "{{ nginx_config_dir }}/kiwix-nginx.conf"
owner: root # Not nec? Remove?
group: root # Not nec? Remove?
mode: '0644' # Not nec? Remove?
when: nginx_install and kiwix_enabled
- name: "Disable http://box{{ kiwix_url_without_slash }} via NGINX, by removing {{ nginx_config_dir }}/kiwix-nginx.conf"
- name: Disable http://box{{ kiwix_url_without_slash }} via NGINX, by removing {{ nginx_config_dir }}/kiwix-nginx.conf
file:
path: "{{ nginx_config_dir }}/kiwix-nginx.conf"
state: absent
@ -71,7 +68,6 @@
- name: Restart nginx systemd service
systemd:
name: nginx
daemon-reload: yes
state: restarted
when: nginx_enabled | bool