1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 03:32:12 +00:00

Calibre playbook now completes offline IF /usr/bin/calibre-uninstall exists

This commit is contained in:
A Holt 2017-11-15 18:56:01 -05:00 committed by GitHub
parent 380db254fa
commit 2e8597cab6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,11 +29,16 @@
path: "{{ downloads_dir }}/calibre-installer.py"
register: calib_inst
- name: FAIL (force Ansible to exit) IF /opt/iiab/downloads/calibre-installer.py doesn't exist OR Internet connection is missing
- name: Check if calibre-uninstall exists in /usr/bin
stat:
path: "/usr/bin/calibre-uninstall"
register: calib_uninst
- name: FAIL (force Ansible to exit) IF /opt/iiab/downloads/calibre-installer.py doesn't exist OR needed Internet connection is missing
# meta: end_play
fail:
msg: "{{ downloads_dir }}/calibre-installer.py and an Internet connection are REQUIRED in order to install Calibre!"
when: (not calib_inst.stat.exists) or (not internet_available)
when: (not calib_inst.stat.exists) or (not internet_available and not calib_uninst.stat.exists)
# INSTALL THE LATEST CALIBRE (calibre-server etc) ON ALL OS'S - RUNS IF /usr/bin/calibre-uninstall DOES NOT ALEADY EXIST