diff --git a/roles/calibre/tasks/main.yml b/roles/calibre/tasks/main.yml index df7383088..12bdf5974 100644 --- a/roles/calibre/tasks/main.yml +++ b/roles/calibre/tasks/main.yml @@ -29,10 +29,11 @@ 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 +- name: FAIL (force Ansible to exit) IF /opt/iiab/downloads/calibre-installer.py doesn't exist OR Internet connection is missing +# meta: end_play fail: - msg: "{{ downloads_dir }}/calibre-installer.py is REQUIRED in order to install Calibre." - when: not calib_inst.stat.exists + 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) # INSTALL THE LATEST CALIBRE (calibre-server etc) ON ALL OS'S - RUNS IF /usr/bin/calibre-uninstall DOES NOT ALEADY EXIST