mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 19:52:06 +00:00
45 lines
1.6 KiB
YAML
45 lines
1.6 KiB
YAML
- name: "Set Kiwix filename to d/l: {{ kiwix_src_file_armhf }} (armv6l or armv71)"
|
|
set_fact:
|
|
kiwix_src_file: "{{ kiwix_src_file_armhf }}"
|
|
kiwix_src_bin_only: True
|
|
when: ansible_machine == "armv7l" or ansible_machine == "armv6l"
|
|
|
|
- name: "Set Kiwix filename to d/l: {{ kiwix_src_file_linux64 }} (x86_64)"
|
|
set_fact:
|
|
kiwix_src_file: "{{ kiwix_src_file_linux64 }}"
|
|
kiwix_src_bin_only: True
|
|
when: ansible_machine == "x86_64"
|
|
|
|
- name: "Set Kiwix filename to d/l: {{ kiwix_src_file_i686 }} (i686)"
|
|
set_fact:
|
|
kiwix_src_file: "{{ kiwix_src_file_i686 }}"
|
|
kiwix_src_bin_only: False
|
|
when: ansible_machine == "i686"
|
|
# COMMENT OUT LINE ABOVE TO TEST i686 CODE PATH ON X86_64 (WORKS NOV 2017)
|
|
|
|
- name: FAIL (force Ansible to exit) IF kiwix-tools appears unavailable for OS/architecture
|
|
# debug:
|
|
fail:
|
|
msg: "WARNING: kiwix-tools SOFTWARE APPEARS UNAVAILABLE FOR YOUR {{ ansible_machine }} 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 }}"
|
|
timeout: "{{ download_timeout }}"
|
|
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
|
|
tags:
|
|
- kiwix
|