2017-11-26 18:02:35 +00:00
|
|
|
- name: "Set Kiwix filename to d/l: {{ kiwix_src_file_armhf }} (armv6l or armv71)"
|
2017-11-26 15:06:51 +00:00
|
|
|
set_fact:
|
2018-09-15 04:21:53 +00:00
|
|
|
kiwix_src_dir: "{{ kiwix_version_armhf }}"
|
|
|
|
kiwix_src_file: "{{ kiwix_src_file_armhf }}"
|
2017-11-26 18:02:35 +00:00
|
|
|
when: ansible_machine == "armv7l" or ansible_machine == "armv6l"
|
|
|
|
|
2017-11-26 15:06:51 +00:00
|
|
|
- name: "Set Kiwix filename to d/l: {{ kiwix_src_file_linux64 }} (x86_64)"
|
2017-05-27 18:09:50 +00:00
|
|
|
set_fact:
|
2018-09-15 04:21:53 +00:00
|
|
|
kiwix_src_dir: "{{ kiwix_version_linux64 }}"
|
|
|
|
kiwix_src_file: "{{ kiwix_src_file_linux64 }}"
|
2017-05-27 18:09:50 +00:00
|
|
|
when: ansible_machine == "x86_64"
|
|
|
|
|
2017-11-26 18:02:35 +00:00
|
|
|
- name: "Set Kiwix filename to d/l: {{ kiwix_src_file_i686 }} (i686)"
|
2017-05-27 18:09:50 +00:00
|
|
|
set_fact:
|
2018-09-15 04:21:53 +00:00
|
|
|
kiwix_src_dir: "{{ kiwix_version_i686 }}"
|
|
|
|
kiwix_src_file: "{{ kiwix_src_file_i686 }}"
|
2017-11-26 18:02:35 +00:00
|
|
|
when: ansible_machine == "i686"
|
2017-11-26 18:03:11 +00:00
|
|
|
# COMMENT OUT LINE ABOVE TO TEST i686 CODE PATH ON X86_64 (WORKS NOV 2017)
|
2017-05-27 18:09:50 +00:00
|
|
|
|
2017-11-26 21:56:26 +00:00
|
|
|
- name: FAIL (force Ansible to exit) IF kiwix-tools appears unavailable for OS/architecture
|
|
|
|
# debug:
|
|
|
|
fail:
|
2017-11-26 21:49:27 +00:00
|
|
|
msg: "WARNING: kiwix-tools SOFTWARE APPEARS UNAVAILABLE FOR YOUR {{ ansible_machine }} OS/ARCHITECTURE."
|
2017-11-26 21:41:51 +00:00
|
|
|
when: not kiwix_src_file
|
|
|
|
|
2019-09-05 05:02:18 +00:00
|
|
|
- name: Check for /opt/iiab/kiwix/bin/kiwix-serve binary
|
|
|
|
stat:
|
|
|
|
path: "{{ kiwix_path }}/bin/kiwix-serve"
|
|
|
|
register: kiwix_bin
|
|
|
|
|
|
|
|
- name: Set fact kiwix_force_install if kiwix-serve not found
|
|
|
|
set_fact:
|
|
|
|
kiwix_force_install: True
|
2019-10-16 05:39:27 +00:00
|
|
|
when: not kiwix_bin.stat.exists or reinstall is defined
|
2017-11-26 21:41:51 +00:00
|
|
|
|
2020-01-11 17:01:48 +00:00
|
|
|
- include_tasks: install.yml
|
|
|
|
when: (kiwix_install and not kiwix_installed is defined) or kiwix_force_install
|
2019-09-05 05:02:18 +00:00
|
|
|
|
2020-01-11 17:01:48 +00:00
|
|
|
- include_tasks: enable.yml
|
|
|
|
when: kiwix_enabled # or kiwix_installed is defined
|