diff --git a/roles/kiwix/tasks/kiwix_install.yml b/roles/kiwix/tasks/kiwix_install.yml index e6957b840..17a92ffdc 100644 --- a/roles/kiwix/tasks/kiwix_install.yml +++ b/roles/kiwix/tasks/kiwix_install.yml @@ -37,7 +37,7 @@ - name: Set kiwix_force_install if kiwix-serve not found set_fact: kiwix_force_install: True - when: kiwix_bin.stat.exists is defined and not kiwix_bin.stat.exists + when: not kiwix_bin.stat.exists - name: Copy test.zim file if kiwix_force_install copy: @@ -110,13 +110,6 @@ - { src: 'iiab-make-kiwix-lib.py', dest: '/usr/bin/iiab-make-kiwix-lib.py', mode: '0755'} - { src: 'iiab-make-apache-config.py', dest: '/usr/bin/iiab-make-apache-config.py', mode: '0755'} -- name: Disable 'kiwix-serve' service - service: - name: kiwix-serve - enabled: no - state: stopped - when: not kiwix_enabled - - name: Enable 'kiwix-serve' service service: name: kiwix-serve @@ -124,6 +117,14 @@ state: restarted when: kiwix_enabled +- name: Disable 'kiwix-serve' service + service: + name: kiwix-serve + enabled: no + state: stopped + when: not kiwix_enabled +# IN THEORY: BOTH CRON ENTRIES BELOW *SHOULD* BE DELETED "when: not kiwix_enabled" + # In the past kiwix-serve did not stay running, so we'd been doing this hourly. # @mgautierfr & others suggest kiwix-serve might be auto-restarted w/o cron in # future, whenever service fails, if this really catches all cases??