1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Update main.yml

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

View file

@ -1,18 +1,36 @@
# 1. INSTALL THE LATEST CALIBRE 3.X+ (calibre-server etc) ON ALL OS'S
# 1. INSTALL THE LATEST CALIBRE 3.X+ (calibre, calibredb, calibre-server etc) ON ALL OS'S
# RUNS IF /usr/bin/calibre-uninstall DOES NOT ALEADY EXIST
- name: Install Calibre via calibre-installer.py (redhat, ubuntu, debian if NOT calibre_debs_on_debian)
include_tasks: py-installer.yml
when: is_redhat or is_ubuntu or (is_debian and not calibre_debs_on_debian)
#when: not is_rpi
- name: Check if /usr/bin/calibre exists
stat:
path: "/usr/bin/calibre"
register: calib_executable
- name: Install Calibre via .debs (Raspbian, Debian if calibre_debs_on_debian)
- name: Install Calibre via OS's package installer (IF /usr/bin/calibre MISSING)
package:
name: "{{ item }}"
state: latest
with_items:
- calibre
- calibre-bin
when: internet_available and (not calib_executable.stat.exists)
- name: Install Calibre experimental .debs IF calibre_via_debs (AND /usr/bin/calibre WAS MISSING)
include_tasks: debs.yml
when: is_rpi or (is_debian and calibre_debs_on_debian)
when: calibre_via_debs and (not calib_executable.stat.exists)
#- name: Install Calibre via .debs (Ubuntu 18.xx)
# include_tasks: debs.yml
# when: is_ubuntu_18
- name: Install Calibre via calibre-installer.py IF calibre_via_python (AND /usr/bin/calibre WAS MISSING)
include_tasks: py-installer.yml
when: calibre_via_python and (not calib_executable.stat.exists)
# SEE calibre_via_python's value vars/default_vars.yml, vars/ubuntu-18.yml &
# vars/raspbian-9.yml: try to AVOID Python installer on Raspbian since its
# .deb's (http://raspbian.raspberrypi.org/raspbian/pool/main/c/calibre/)
# are updated within about 10 days of Calibre's quasi-monthly releases!
#
# BUT IF ABSOLUTELY NEC: (SEE roles/calibre/tasks/debs.yml)
# - run testing branch for RPi: scripts/calibre-install-latest-rpi.sh
# - run testing branch for Ubuntu 16.04: scripts/calibre-install-latest.sh
# - run unstable branch for Debian etc: scripts/calibre-install-unstable.sh
- name: Create calibre-serve.service and calibre.conf
template:
@ -27,7 +45,7 @@
- { src: 'calibre-serve.service.j2', dest: '/etc/systemd/system/calibre-serve.service', mode: '0644'}
- { src: 'calibre.conf', dest: '/etc/{{ apache_config_dir }}', mode: '0644'}
- name: Forcing systemd to reread configs
- name: Force systemd to reread configs
systemd:
daemon_reload: yes
when: calibre_config.changed