mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Merge pull request #739 from jvonau/cal-rpi2
cal-rpi2: refine Calibre install approaches for each OS
This commit is contained in:
commit
a7743ab413
8 changed files with 68 additions and 24 deletions
|
@ -12,5 +12,7 @@ calibre_sample_book: "Metamorphosis-jackson.epub"
|
||||||
|
|
||||||
calibre_src_url: "https://raw.githubusercontent.com/kovidgoyal/calibre/master/setup/linux-installer.py"
|
calibre_src_url: "https://raw.githubusercontent.com/kovidgoyal/calibre/master/setup/linux-installer.py"
|
||||||
|
|
||||||
calibre_debs_on_debian: true
|
|
||||||
# USE TO TEST debs.yml (RASPBIAN APPROACH!) ON DEBIAN 9.X
|
# USE TO TEST debs.yml (RASPBIAN APPROACH!) ON DEBIAN 9.X
|
||||||
|
calibre_debs_on_debian: True
|
||||||
|
# enable calibre unstable
|
||||||
|
calibre_unstable: False
|
||||||
|
|
|
@ -1,17 +1,24 @@
|
||||||
- name: Start by installing OS's Calibre package
|
- name: Start by installing OS's Calibre package
|
||||||
package:
|
package:
|
||||||
name: calibre
|
name: "{{ item }}"
|
||||||
state: present
|
state: latest
|
||||||
|
with_items:
|
||||||
|
- calibre
|
||||||
|
- calibre-bin
|
||||||
|
when: internet_available
|
||||||
|
|
||||||
# April 5 2018 raspbian is now tracking the latest Calibre with a small delay.
|
# April 5 2018 raspbian is now tracking the latest Calibre with a small delay.
|
||||||
# Should you really want the latest just run the below script standalone, it is
|
# Should you really want the latest just run the below script standalone, it is
|
||||||
# strongly suggested that waiting for the lastest deb from Rasbian is the best.
|
# strongly suggested that waiting for the lastest deb from Raspbian is the best.
|
||||||
|
|
||||||
- name: Upgrade latest Calibre
|
- name: Upgrade to testing Calibre - RPi
|
||||||
|
command: scripts/calibre-install-latest-rpi.sh
|
||||||
|
when: is_rpi and internet_available
|
||||||
|
|
||||||
|
- name: Upgrade to testing Calibre - non-RPi
|
||||||
command: scripts/calibre-install-latest.sh
|
command: scripts/calibre-install-latest.sh
|
||||||
#when: not is_rpi
|
when: not is_rpi and not is_ubuntu_18 and internet_available
|
||||||
|
|
||||||
# Oops "when: not is_rpi" causes Calibre playbook to fail on Raspbian Lite (possibly
|
- name: Upgrade to unstable Calibre - all
|
||||||
# other OS's too). Error msg is: "Unable to start service calibre-serve: Job for
|
command: scripts/calibre-install-unstable.sh
|
||||||
# calibre-serve.service failed because the control process exited with error code."
|
when: calibre_unstable and internet_available
|
||||||
# Running "calibre --version" then responds with "calibre (calibre 2.75.1)".
|
|
||||||
|
|
|
@ -3,13 +3,16 @@
|
||||||
# RUNS IF /usr/bin/calibre-uninstall DOES NOT ALEADY EXIST
|
# 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)
|
- name: Install Calibre via calibre-installer.py (redhat, ubuntu, debian if NOT calibre_debs_on_debian)
|
||||||
include_tasks: py-installer.yml
|
include_tasks: py-installer.yml
|
||||||
when: is_redhat or is_ubuntu or (is_debian and not calibre_debs_on_debian)
|
when: is_redhat or (is_ubuntu and not is_ubuntu_18) or (is_debian and not calibre_debs_on_debian)
|
||||||
#when: not is_rpi
|
#when: not is_rpi
|
||||||
|
|
||||||
- name: Install Calibre via .debs (Raspbian, Debian if calibre_debs_on_debian)
|
- name: Install Calibre via .debs (Raspbian, Debian if calibre_debs_on_debian)
|
||||||
include_tasks: debs.yml
|
include_tasks: debs.yml
|
||||||
when: is_rpi or (is_debian and calibre_debs_on_debian)
|
when: is_rpi or (is_debian and calibre_debs_on_debian)
|
||||||
#when: is_rpi or is_debian # (is_debian also covers & includes is_rpi)
|
|
||||||
|
- name: Install Calibre via .debs (Ubuntu 18.xx)
|
||||||
|
include_tasks: debs.yml
|
||||||
|
when: is_ubuntu_18
|
||||||
|
|
||||||
- name: Create calibre-serve.service and calibre.conf
|
- name: Create calibre-serve.service and calibre.conf
|
||||||
template:
|
template:
|
||||||
|
|
18
scripts/calibre-install-latest-rpi.sh
Executable file
18
scripts/calibre-install-latest-rpi.sh
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Thanks to Jerry Vonau (https://github.com/jvonau) who made
|
||||||
|
# this critical breakthrough (Calibre 3.x on Raspbian) possible!
|
||||||
|
# The latest available is 3.20 available from testing
|
||||||
|
# https://packages.debian.org/search?keywords=calibre
|
||||||
|
# (SEE http://archive.raspbian.org/raspbian/pool/main/c/calibre/ ?)
|
||||||
|
# might break future updates, you have been warned
|
||||||
|
|
||||||
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
# Updates calibre calibre-bin to version 3.20 or ... from testing
|
||||||
|
echo "deb http://raspbian.raspberrypi.org/raspbian/ testing main" > /etc/apt/sources.list.d/rpi-testing.list
|
||||||
|
apt update
|
||||||
|
apt -y install calibre calibre-bin
|
||||||
|
# Remove last line, safer than: rm /etc/apt/sources.list.d/debian-testing.list
|
||||||
|
sed -i '$ d' /etc/apt/sources.list.d/rpi-testing.list
|
||||||
|
# Clears the cache of testing
|
||||||
|
apt update
|
|
@ -1,26 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Thanks to Jerry Vonau (https://github.com/jvonau) who made
|
# Thanks to Jerry Vonau (https://github.com/jvonau) who made
|
||||||
# this critical breakthrough (Calibre 3.x on Raspbian) possible!
|
# this critical breakthrough for Calibre 3.x possible!
|
||||||
|
# The latest available is 3.20 available from testing
|
||||||
|
# https://packages.debian.org/search?keywords=calibre
|
||||||
|
# (SEE http://deb.debian.org/debian/pool/main/c/calibre/ ?)
|
||||||
|
# might break future updates, you have been warned
|
||||||
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
# Drags in stock desktop dependencies without too much from testing below
|
# Drags in stock desktop dependencies without too much from testing below
|
||||||
apt -y install calibre-bin dirmngr
|
apt -y install calibre-bin dirmngr
|
||||||
|
# Updates calibre calibre-bin to version 3.20 or ... from testing
|
||||||
# Updates calibre-bin to version 3.10 or 3.14 or ... from testing (SEE http://archive.raspbian.org/raspbian/pool/main/c/calibre/ ?)
|
|
||||||
apt-key adv --recv-key --keyserver keyserver.ubuntu.com 7638D0442B90D010
|
apt-key adv --recv-key --keyserver keyserver.ubuntu.com 7638D0442B90D010
|
||||||
echo "deb http://deb.debian.org/debian testing main" >> /etc/apt/sources.list.d/debian-testing.list
|
echo "deb http://deb.debian.org/debian testing main" >> /etc/apt/sources.list.d/debian-testing.list
|
||||||
apt update
|
apt update
|
||||||
apt -y install libqt5core5a python-lxml calibre
|
apt -y install libqt5core5a python-lxml calibre
|
||||||
# Remove last line, safer than: rm /etc/apt/sources.list.d/debian-testing.list
|
# Remove last line, safer than: rm /etc/apt/sources.list.d/debian-testing.list
|
||||||
sed -i '$ d' /etc/apt/sources.list.d/debian-testing.list
|
sed -i '$ d' /etc/apt/sources.list.d/debian-testing.list
|
||||||
|
|
||||||
# Updates to calibre & calibre-bin to "very latest" 3.x from unstable
|
|
||||||
echo "deb http://deb.debian.org/debian unstable main" >> /etc/apt/sources.list.d/debian-unstable.list
|
|
||||||
apt update
|
|
||||||
apt -y install calibre
|
|
||||||
# Remove last line, safer than: rm /etc/apt/sources.list.d/debian-unstable.list
|
|
||||||
sed -i '$ d' /etc/apt/sources.list.d/debian-unstable.list
|
|
||||||
|
|
||||||
# Clears the cache of testing and unstable
|
|
||||||
apt update
|
apt update
|
||||||
|
|
18
scripts/calibre-install-unstable.sh
Executable file
18
scripts/calibre-install-unstable.sh
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Thanks to Jerry Vonau (https://github.com/jvonau) who made
|
||||||
|
# this critical breakthrough possible!
|
||||||
|
# might break future updates, you have been warned
|
||||||
|
# The latest available is 3.20 available from testing
|
||||||
|
# https://packages.debian.org/search?keywords=calibre
|
||||||
|
# might break future updates, you have been warned
|
||||||
|
|
||||||
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
# Updates to calibre & calibre-bin to "very latest" 3.x from unstable
|
||||||
|
echo "deb http://deb.debian.org/debian unstable main" >> /etc/apt/sources.list.d/unstable.list
|
||||||
|
apt update
|
||||||
|
apt -y install calibre calibre-bin
|
||||||
|
# Remove last line, safer than: rm /etc/apt/sources.list.d/debian-unstable.list
|
||||||
|
sed -i '$ d' /etc/apt/sources.list.d/unstable.list
|
||||||
|
# Clears the cache of testing and unstable
|
||||||
|
apt update
|
|
@ -383,6 +383,7 @@ xovis_chart_heading: "My School: Usage Data Visualization"
|
||||||
# wide to narrow
|
# wide to narrow
|
||||||
is_debuntu: False
|
is_debuntu: False
|
||||||
is_ubuntu: False
|
is_ubuntu: False
|
||||||
|
is_ubuntu_18: False
|
||||||
is_debian: False
|
is_debian: False
|
||||||
is_debian_9: False
|
is_debian_9: False
|
||||||
is_debian_8: False
|
is_debian_8: False
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
is_debuntu: True
|
is_debuntu: True
|
||||||
is_ubuntu: True
|
is_ubuntu: True
|
||||||
|
is_ubuntu_18: True
|
||||||
dns_service: bind9
|
dns_service: bind9
|
||||||
dns_user: bind
|
dns_user: bind
|
||||||
dhcp_service: isc-dhcp-server
|
dhcp_service: isc-dhcp-server
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue