1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-15 04:32:11 +00:00

Update py-installer.yml

This commit is contained in:
A Holt 2018-05-10 16:21:49 -04:00 committed by GitHub
parent 4e94a0d6a7
commit 26c6d2ea74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,21 +32,23 @@
path: "{{ downloads_dir }}/calibre-installer.py"
register: calib_inst
- name: Check if calibre-uninstall exists in /usr/bin
stat:
path: "/usr/bin/calibre-uninstall"
register: calib_uninst
# MOVED UP TO roles/calibre/tasks/main.yml (now checks for /usr/bin/calibre)
#- 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 and not calib_uninst.stat.exists)
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) - RUNS IF /usr/bin/calibre-uninstall DOES NOT ALEADY EXIST
# INSTALL THE LATEST CALIBRE (calibre, calibredb, calibre-server etc)
- name: Run calibre-installer.py to install Calibre programs into /usr/bin - MANUALLY REMOVE /usr/bin/calibre-uninstall TO FORCE calibre-installer.py TO REINSTALL/UPGRADE HERE!
- name: Run calibre-installer.py to install Calibre programs into /usr/bin
shell: "{{ downloads_dir }}/calibre-installer.py >> /dev/null"
args:
creates: /usr/bin/calibre-uninstall
#args:
# creates: /usr/bin/calibre-uninstall
when: internet_available