diff --git a/roles/calibre/tasks/create-db.yml b/roles/calibre/tasks/create-db.yml index f630f8b2e..c2723d1d8 100644 --- a/roles/calibre/tasks/create-db.yml +++ b/roles/calibre/tasks/create-db.yml @@ -1,9 +1,3 @@ -- name: Create /library/calibre (mandatory since Calibre 3.x) - file: - path: "{{ calibre_dbpath }}" - state: directory - #mode: 0755 - - name: Check if sample book exists in /opt/iiab/downloads stat: path: "{{ content_base }}/downloads/{{ calibre_sample_book }}" diff --git a/roles/calibre/tasks/main.yml b/roles/calibre/tasks/main.yml index 7e1c20156..5cfb310d0 100644 --- a/roles/calibre/tasks/main.yml +++ b/roles/calibre/tasks/main.yml @@ -32,15 +32,6 @@ # - run testing branch for Ubuntu 16.04: scripts/calibre-install-latest.sh # - run unstable branch for Debian etc: scripts/calibre-install-unstable.sh -- name: Copy template userdb to /library/calibre/users.sqlite (IF /usr/bin/calibre WAS MISSING) - copy: - src: /opt/iiab/iiab/roles/calibre/templates/users.sqlite - dest: "{{ calibre_userdb }}" - owner: root - group: root - mode: 0644 - when: (not calib_executable.stat.exists) - - name: Create calibre-serve.service and calibre.conf (IF /usr/bin/calibre WAS MISSING) template: src: "{{ item.src }}" @@ -78,7 +69,24 @@ # failed_when: false # Never Fail during "systemctl stop calibre-serve" (even if service doesn't exist!) # when: calibre_svc.stat.exists -# 3. CREATE DATABASE WITH A SAMPLE BOOK (REQUIRED AS OF CALIBRE 3.x) +# 3. CREATE USER DATABASE + +- name: Create /library/calibre (mandatory since Calibre 3.x) + file: + path: "{{ calibre_dbpath }}" + state: directory + #mode: 0755 + +- name: Copy template userdb to /library/calibre/users.sqlite (IF /usr/bin/calibre WAS MISSING) + copy: + src: /opt/iiab/iiab/roles/calibre/templates/users.sqlite + dest: "{{ calibre_userdb }}" + owner: root + group: root + mode: 0644 + when: (not calib_executable.stat.exists) + +# 4. CREATE CONTENT DATABASE WITH A SAMPLE BOOK (REQUIRED AS OF CALIBRE 3.x) - name: Check if /library/calibre/metadata.db exists stat: @@ -89,7 +97,7 @@ include_tasks: create-db.yml when: not calibre_db.stat.exists -# 4. WRAP UP: ENABLE CALIBRE SERVICE, http://box/books ETC +# 5. WRAP UP: ENABLE CALIBRE SERVICE, http://box/books ETC # http://box:8080 & http://box:8080/mobile WORK BUT OTHER URL'S LIKE http://box/books ARE A MESS (BOOKS RARELY DISPLAY) - name: Create calibre.conf link for UNTESTED http://box/books etc (debuntu) diff --git a/roles/kalite/tasks/install.yml b/roles/kalite/tasks/install.yml index 4be6dc4c7..331163dc8 100644 --- a/roles/kalite/tasks/install.yml +++ b/roles/kalite/tasks/install.yml @@ -32,7 +32,7 @@ # extra_args="--disable-pip-version-check" when: internet_available and is_debuntu -#- name: Install KA Lite non-static + reqs file with pip - (OS's other than debuntu) +#- name: Install KA Lite non-static + reqs file with pip (OS's other than debuntu) # pip: requirements={{ pip_packages_dir }}/kalite.txt # virtualenv={{ kalite_venv }} # virtualenv_site_packages=no @@ -40,7 +40,7 @@ # extra_args="--disable-pip-version-check" # when: internet_available and not is_debuntu -- name: Install KA Lite static with pip - (OS's other than debuntu) +- name: Install KA Lite static with pip (OS's other than debuntu) pip: name: ka-lite-static version: "{{ kalite_version }}" diff --git a/roles/kalite/tasks/main.yml b/roles/kalite/tasks/main.yml index f68fd7d92..35f1932f7 100644 --- a/roles/kalite/tasks/main.yml +++ b/roles/kalite/tasks/main.yml @@ -4,12 +4,12 @@ - name: Calc KA Lite db file name (Fedora 18) set_fact: - kalite_db_name: "{{ kalite_root }}/kalite/database/data.sqlite" + kalite_db_name: "{{ kalite_root }}/kalite/database/data.sqlite" when: is_F18 - name: Calc KA Lite db file name (OS's other than Fedora 18) set_fact: - kalite_db_name: "{{ kalite_root }}/database/data.sqlite" + kalite_db_name: "{{ kalite_root }}/database/data.sqlite" when: not is_F18 - name: See if KA Lite is already configured diff --git a/roles/sugarizer/templates/sugarizer.service.j2 b/roles/sugarizer/templates/sugarizer.service.j2 index e21f3b6e0..3b1e75cfa 100644 --- a/roles/sugarizer/templates/sugarizer.service.j2 +++ b/roles/sugarizer/templates/sugarizer.service.j2 @@ -1,7 +1,8 @@ [Unit] Description=Node.js Sugarizer Server Requires=mongodb.service -After=mongodb.service # Requires the mongodb service to run first +After=mongodb.service +# Requires mongodb service to run first [Service] WorkingDirectory=/opt/iiab/sugarizer-server/ diff --git a/scripts/calibre-install-packages.sh b/scripts/calibre-install-packages.sh index 616a1a7f0..ba99b882a 100755 --- a/scripts/calibre-install-packages.sh +++ b/scripts/calibre-install-packages.sh @@ -32,12 +32,12 @@ # https://github.com/iiab/iiab/pull/833 # WORKED ON RPI 3 AND RPI 3 B+ BUT... # https://github.com/iiab/iiab/issues/835 # FAILED ON RPI ZERO W, possibly due to libc6 (IF ABOVE STEP 2 NOT RUN!) -# FYI Calibre 3.26.0 is the latest available from testing as of 2018-06-21: +# FYI Calibre 3.26.1 and 3.27.1 are the latest available from testing as of 2018-07-10: # # http://raspbian.raspberrypi.org/raspbian/pool/main/c/calibre/ # http://archive.raspbian.org/raspbian/pool/main/c/calibre/ # https://packages.debian.org/search?keywords=calibre -# http://deb.debian.org/debian/pool/main/c/calibre/ +# http://deb.debian.org/debian/pool/main/c/calibre/ ~= http://cdn-fastly.deb.debian.org/debian/pool/main/c/calibre/ # # Might break future updates; you have been warned.