diff --git a/roles/kiwix/tasks/main.yml b/roles/kiwix/tasks/main.yml index a12a82ece..3bf1b16f8 100644 --- a/roles/kiwix/tasks/main.yml +++ b/roles/kiwix/tasks/main.yml @@ -17,17 +17,27 @@ when: ansible_machine == "i686" # COMMENT OUT LINE ABOVE TO TEST i686 CODE PATH ON X86_64 (WORKS NOV 2017) +- debug: + msg: "WARNING: kiwix-tools SOFTWARE APPEARS UNAVAILABLE FOR YOUR OS/ARCHITECTURE." + when: not kiwix_src_file + - name: Download Kiwix software to /opt/iiab/downloads get_url: url: "{{ iiab_download_url }}/{{ kiwix_src_file }}" dest: "{{ downloads_dir }}/{{ kiwix_src_file }}" when: internet_available +- name: Check for /opt/iiab/downloads/{{ kiwix_src_file }} + stat: + path: "{{ downloads_dir }}/{{ kiwix_src_file }}" + register: kiwix_src + +- name: FAIL (force Ansible to exit) IF /opt/iiab/downloads/{{ kiwix_src_file }} doesn't exist + fail: + msg: "{ downloads_dir }}/{{ kiwix_src_file }} is REQUIRED in order to install Kiwix." + when: not kiwix_src.stat.exists + - include_tasks: kiwix_install.yml - when: kiwix_src_file is defined +# when: kiwix_src_file is defined tags: - kiwix - -- debug: - msg: "WARNING: kiwix-tools SOFTWARE NOT FOUND FOR YOUR OS/ARCHITECTURE." - when: not kiwix_src_file