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:
|
2017-11-26 18:02:35 +00:00
|
|
|
kiwix_src_file: "{{ kiwix_src_file_armhf }}"
|
|
|
|
kiwix_src_bin_only: True
|
|
|
|
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:
|
2017-11-26 15:09:17 +00:00
|
|
|
kiwix_src_file: "{{ kiwix_src_file_linux64 }}"
|
2017-06-04 16:41:04 +00:00
|
|
|
kiwix_src_bin_only: True
|
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:
|
2017-11-26 18:02:35 +00:00
|
|
|
kiwix_src_file: "{{ kiwix_src_file_i686 }}"
|
|
|
|
kiwix_src_bin_only: False
|
|
|
|
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
|
|
|
|
|
2017-11-26 15:20:33 +00:00
|
|
|
- name: Download Kiwix software to /opt/iiab/downloads
|
2017-11-26 15:06:51 +00:00
|
|
|
get_url:
|
|
|
|
url: "{{ iiab_download_url }}/{{ kiwix_src_file }}"
|
|
|
|
dest: "{{ downloads_dir }}/{{ kiwix_src_file }}"
|
2017-08-30 02:21:51 +00:00
|
|
|
when: internet_available
|
2017-05-27 18:09:50 +00:00
|
|
|
|
2017-11-26 21:41:51 +00:00
|
|
|
- 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
|
|
|
|
|
2017-10-31 03:55:24 +00:00
|
|
|
- include_tasks: kiwix_install.yml
|
2017-05-27 18:09:50 +00:00
|
|
|
tags:
|
|
|
|
- kiwix
|