mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
kiwix allow reinstall/updates with runrole --reinstall
This commit is contained in:
parent
4cfd10d44a
commit
579fa10b05
2 changed files with 13 additions and 14 deletions
|
@ -1,4 +1,15 @@
|
||||||
# 1. CREATE/VERIFY CRITICAL DIRECTORIES & FILES ARE IN PLACE
|
# 1. CREATE/VERIFY CRITICAL DIRECTORIES & FILES ARE IN PLACE
|
||||||
|
- 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 | bool
|
||||||
|
|
||||||
|
- name: Check for /opt/iiab/downloads/{{ kiwix_src_file }}
|
||||||
|
stat:
|
||||||
|
path: "{{ downloads_dir }}/{{ kiwix_src_file }}"
|
||||||
|
register: kiwix_src
|
||||||
|
|
||||||
- name: Create directory {{ iiab_zim_path }} and subdirs {content, index} for Kiwix ZIM files
|
- name: Create directory {{ iiab_zim_path }} and subdirs {content, index} for Kiwix ZIM files
|
||||||
file:
|
file:
|
||||||
|
|
|
@ -23,18 +23,6 @@
|
||||||
msg: "WARNING: kiwix-tools SOFTWARE APPEARS UNAVAILABLE FOR YOUR {{ ansible_machine }} OS/ARCHITECTURE."
|
msg: "WARNING: kiwix-tools SOFTWARE APPEARS UNAVAILABLE FOR YOUR {{ ansible_machine }} OS/ARCHITECTURE."
|
||||||
when: not kiwix_src_file
|
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 | bool and kiwix_install | bool and not kiwix_installed is defined
|
|
||||||
|
|
||||||
- name: Check for /opt/iiab/downloads/{{ kiwix_src_file }}
|
|
||||||
stat:
|
|
||||||
path: "{{ downloads_dir }}/{{ kiwix_src_file }}"
|
|
||||||
register: kiwix_src
|
|
||||||
|
|
||||||
- name: Check for /opt/iiab/kiwix/bin/kiwix-serve binary
|
- name: Check for /opt/iiab/kiwix/bin/kiwix-serve binary
|
||||||
stat:
|
stat:
|
||||||
path: "{{ kiwix_path }}/bin/kiwix-serve"
|
path: "{{ kiwix_path }}/bin/kiwix-serve"
|
||||||
|
@ -43,10 +31,10 @@
|
||||||
- name: Set fact kiwix_force_install if kiwix-serve not found
|
- name: Set fact kiwix_force_install if kiwix-serve not found
|
||||||
set_fact:
|
set_fact:
|
||||||
kiwix_force_install: True
|
kiwix_force_install: True
|
||||||
when: not kiwix_bin.stat.exists
|
when: not kiwix_bin.stat.exists or reinstall is defined
|
||||||
|
|
||||||
- include_tasks: kiwix_install.yml
|
- include_tasks: kiwix_install.yml
|
||||||
when: kiwix_install | bool and (not kiwix_installed is defined or kiwix_force_install | bool)
|
when: (kiwix_install | bool and not kiwix_installed is defined) or kiwix_force_install | bool
|
||||||
tags:
|
tags:
|
||||||
- kiwix
|
- kiwix
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue