mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
services - is_rpi -> is_raspbian
This commit is contained in:
parent
ebf24417aa
commit
9d9997584e
15 changed files with 40 additions and 40 deletions
|
@ -1,3 +1,3 @@
|
|||
- name: Install nodogsplash (Raspbian only)
|
||||
include_tasks: rpi.yml
|
||||
when: is_rpi | bool
|
||||
when: is_raspbian | bool
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
apt:
|
||||
deb: "{{ iiab_download_url }}/usbmount_0.0.14.1_all.deb"
|
||||
#timeout: "{{ download_timeout }}" # Ansible's apt module doesn't support timeout parameter; that's ok as usbmount_0.0.14.1_all.deb is only 10KB
|
||||
when: internet_available and (is_debian_9 or is_debian_10) and not is_rpi
|
||||
when: internet_available and (is_debian_9 or is_debian_10) and not is_raspbian
|
||||
|
||||
- name: "Install 6 deb/apt packages: avahi-daemon, exfat-fuse, exfat-utils, inetutils-syslogd, libnss-mdns, wpasupplicant (debuntu)"
|
||||
package:
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
- name: Install Bluetooth - only on Raspberry Pi
|
||||
include_role:
|
||||
name: bluetooth
|
||||
when: is_rpi and bluetooth_install
|
||||
when: is_raspbian and bluetooth_install
|
||||
|
||||
- name: USB_LIB
|
||||
include_role:
|
||||
|
|
|
@ -21,16 +21,16 @@
|
|||
|
||||
#- name: Install packages that Raspbian .deb's had installed for Calibre 3.23 (rpi)
|
||||
# command: scripts/calibre-install-packages.sh # BORROWED package list from /var/log/apt/history.log (that resulted from 2018-05-22 install of Calibre 3.23 using calibre-install-latest-rpi.sh).
|
||||
# when: is_rpi and internet_available
|
||||
# when: is_raspbian and internet_available
|
||||
|
||||
#- name: Upgrade to latest Calibre using Debian's own .deb's from testing (rpi)
|
||||
# command: scripts/calibre-install-latest.sh # WAS NEC with Calibre 3.24+ & Calibre 3.29 on 2018-08-21 (PR #1015), as all above strategies failed (only script that was not attempted: Sid-like calibre-install-unstable.sh). CLARIF: RESULTING microSD's ARE NOT BOOTABLE IN Zero W (#952) due to libc6 or similar.e.g. if calibre-install-packages.sh isn't run above?
|
||||
# #command: scripts/calibre-install-latest-rpi-plus.sh # WORKED for Calibre 3.27.1 on 2018-07-22 (#948 -> PR #950) THO NOT BOOTABLE IN Zero W (#952). Similar to Calibre 3.24.x & 3.25 in June 2018, which had used calibre-install-packages.sh then Debian's own calibre-install-latest.sh
|
||||
# when: is_rpi and internet_available
|
||||
# when: is_raspbian and internet_available
|
||||
|
||||
- name: Upgrade to latest Calibre using .deb's from testing (rpi)
|
||||
command: scripts/calibre-install-latest-rpi.sh # WORKED for Calibre 3.33.1 on 2018-10-23. And Calibre 3.28 on 2018-07-26 (PR #971). Likewise for Calibre 3.26.x. FAILED with Calibre 3.24+ ("calibre : Depends: python-pyqt5 (>= 5.10.1+dfsg-2) but 5.10.1+dfsg-1+rpi1 is to be installed") since June 2018.
|
||||
when: is_rpi and internet_available
|
||||
when: is_raspbian and internet_available
|
||||
|
||||
#- name: Download PINNED version {{ calibre_deb_pin_version }} of calibre & calibre-bin (rpi)
|
||||
# get_url:
|
||||
|
@ -41,17 +41,17 @@
|
|||
# with_items:
|
||||
# - calibre_{{ calibre_deb_pin_version }}_all.deb
|
||||
# - calibre-bin_{{ calibre_bin_deb_pin_version }}_armhf.deb
|
||||
# when: is_rpi and internet_available
|
||||
# when: is_raspbian and internet_available
|
||||
#
|
||||
#- name: Install/Upgrade both, to PINNED version {{ calibre_deb_pin_version }} using additional .deb's from testing (rpi)
|
||||
# command: scripts/calibre-install-pinned-rpi.sh # Worked for Calibre 3.33.1 on 2018-10-23, e.g. so IIAB microSD bootable in RPi Zero W
|
||||
# when: is_rpi and internet_available
|
||||
# when: is_raspbian and internet_available
|
||||
|
||||
- name: Install/Upgrade to Calibre testing .deb's (not rpi)
|
||||
command: scripts/calibre-install-latest.sh
|
||||
when: (not is_rpi) and internet_available
|
||||
#when: (not is_rpi) and (is_debian_9 or is_ubuntu_16) and internet_available
|
||||
#when: not is_rpi and not is_ubuntu_18 and internet_available
|
||||
when: (not is_raspbian) and internet_available
|
||||
#when: (not is_raspbian) and (is_debian_9 or is_ubuntu_16) and internet_available
|
||||
#when: not is_raspbian and not is_ubuntu_18 and internet_available
|
||||
|
||||
- name: Install/Upgrade to Calibre unstable .deb's IF calibre_unstable_debs
|
||||
command: scripts/calibre-install-unstable.sh
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
- calibre
|
||||
- calibre-bin
|
||||
state: latest
|
||||
when: internet_available and not is_rpi and (not calib_executable.stat.exists)
|
||||
when: internet_available and not is_raspbian and (not calib_executable.stat.exists)
|
||||
|
||||
- name: Install Calibre .debs IF calibre_via_debs (AND /usr/bin/calibre WAS MISSING)
|
||||
include_tasks: debs.yml
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
src: sshpwd-lxde-iiab.sh
|
||||
dest: /etc/xdg/lxsession/LXDE-pi/
|
||||
mode: '0755'
|
||||
when: lx.stat.isdir is defined and lx.stat.isdir and is_rpi and is_debuntu
|
||||
when: lx.stat.isdir is defined and lx.stat.isdir and is_raspbian and is_debuntu
|
||||
|
||||
# 2019-03-07: This popup (/etc/xdg/lxsession/LXDE-pi/sshpwd-lxde-iiab.sh) does
|
||||
# not actually appear when triggered by /etc/xdg/autostart/pprompt-iiab.desktop
|
||||
|
@ -47,4 +47,4 @@
|
|||
lineinfile:
|
||||
path: /etc/xdg/lxsession/LXDE-pi/autostart
|
||||
line: "@/etc/xdg/lxsession/LXDE-pi/sshpwd-lxde-iiab.sh"
|
||||
when: lx.stat.isdir is defined and lx.stat.isdir and is_rpi and is_debuntu
|
||||
when: lx.stat.isdir is defined and lx.stat.isdir and is_raspbian and is_debuntu
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#- name: Run 'mv /etc/pip.conf /etc/pip.conf.see-iiab-issue-2139' as "TEMPORARY" workaround (2020-01-17) for piwheels.org's setuptools Python 2/3 brokenness on RPi (https://github.com/iiab/iiab/issues/2139)
|
||||
# command: mv /etc/pip.conf /etc/pip.conf.see-iiab-issue-2139
|
||||
# ignore_errors: yes
|
||||
# when: is_rpi | bool
|
||||
# when: is_raspbian | bool
|
||||
|
||||
#- name: Install KA Lite non-static + reqs file with pip - (debuntu)
|
||||
# pip: requirements={{ pip_packages_dir }}/kalite.txt
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#- name: Run 'mv /etc/pip.conf /etc/pip.conf.see-iiab-issue-2139' as "TEMPORARY" workaround (2020-01-17) for piwheels.org's setuptools Python 2/3 brokenness on RPi (https://github.com/iiab/iiab/issues/2139)
|
||||
# command: mv /etc/pip.conf /etc/pip.conf.see-iiab-issue-2139
|
||||
# ignore_errors: yes
|
||||
# when: is_rpi | bool
|
||||
# when: is_raspbian | bool
|
||||
|
||||
- name: Use pip to install KA Lite static to {{ kalite_venv }}
|
||||
pip:
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
# only works if server run as root
|
||||
minetest_runas_user: root
|
||||
minetest_runas_group: root
|
||||
when: is_rpi | bool
|
||||
when: is_raspbian | bool
|
||||
|
||||
# For other installs
|
||||
- name: Set some facts for other platforms
|
||||
|
@ -16,7 +16,7 @@
|
|||
minetest_working_dir: /usr/share/games/minetest
|
||||
minetest_runas_user: Debian-minetest
|
||||
minetest_runas_group: games
|
||||
when: not is_rpi
|
||||
when: not is_raspbian
|
||||
|
||||
- name: Set some facts for all
|
||||
set_fact:
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
|
||||
# rpi only
|
||||
- include_tasks: rpi_minetest_install.yml
|
||||
when: not minetest_world.stat.exists and is_rpi
|
||||
when: not minetest_world.stat.exists and is_raspbian
|
||||
|
||||
# not rpi
|
||||
- include_tasks: minetest_install.yml
|
||||
when: not minetest_world.stat.exists and not is_rpi
|
||||
when: not minetest_world.stat.exists and not is_raspbian
|
||||
|
||||
- git:
|
||||
repo: https://github.com/Calinou/carbone-ng.git
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
- mongodb-server
|
||||
- mongodb # 2019-01-31: this package does not exist on (cannot be installed on) Debian 10, SEE #1437
|
||||
state: present
|
||||
when: internet_available and not is_rpi
|
||||
when: internet_available and not is_raspbian
|
||||
|
||||
# 2019-02-02: Sugarizer with Node.js 10.x requires MongoDB 2.6+ so
|
||||
# https://andyfelong.com/2017/08/mongodb-3-0-14-for-raspbian-stretch/
|
||||
|
@ -22,29 +22,29 @@
|
|||
file:
|
||||
path: /tmp/mongodb-3.0.1x
|
||||
state: directory
|
||||
when: internet_available and is_rpi
|
||||
when: internet_available and is_raspbian
|
||||
|
||||
- name: Download & unzip 20MB http://download.iiab.io/packages/mongodb_stretch_3_0_14_core.zip to /tmp/mongodb-3.0.1x (rpi)
|
||||
unarchive:
|
||||
remote_src: yes
|
||||
src: "{{ iiab_download_url }}/mongodb_stretch_3_0_14_core.zip"
|
||||
dest: /tmp/mongodb-3.0.1x
|
||||
when: internet_available and is_rpi
|
||||
when: internet_available and is_raspbian
|
||||
|
||||
- name: Install (move) its 3 CORE binaries from /tmp/mongodb-3.0.1x/core to /usr/bin (rpi)
|
||||
shell: mv /tmp/mongodb-3.0.1x/core/* /usr/bin
|
||||
when: internet_available and is_rpi
|
||||
when: internet_available and is_raspbian
|
||||
|
||||
- name: Download & unzip 15MB http://download.iiab.io/packages/mongodb_stretch_3_0_14_tools.zip [IN FACT THIS ONE'S 3.0.15] to /tmp/mongodb-3.0.1x (rpi)
|
||||
unarchive:
|
||||
remote_src: yes
|
||||
src: "{{ iiab_download_url }}/mongodb_stretch_3_0_14_tools.zip"
|
||||
dest: /tmp/mongodb-3.0.1x
|
||||
when: internet_available and is_rpi
|
||||
when: internet_available and is_raspbian
|
||||
|
||||
- name: Install (move) its 9 TOOLS binaries from /opt/iiab/downloads/mongodb-3.0.1x/tools to /usr/bin (rpi)
|
||||
shell: mv /tmp/mongodb-3.0.1x/tools/* /usr/bin
|
||||
when: internet_available and is_rpi
|
||||
when: internet_available and is_raspbian
|
||||
|
||||
# OLD WAY / MUCH SLOWER: had put unnec duplicate copies in /opt/iiab/downloads/mongodb-3.0.1x
|
||||
#
|
||||
|
@ -52,14 +52,14 @@
|
|||
# file:
|
||||
# path: "{{ downloads_dir }}/mongodb-3.0.1x"
|
||||
# state: directory
|
||||
# when: internet_available and is_rpi
|
||||
# when: internet_available and is_raspbian
|
||||
#
|
||||
#- name: Download & unzip MongoDB 3.0.14's 3 core binaries to /opt/iiab/downloads/mongodb-3.0.1x (rpi)
|
||||
# unarchive:
|
||||
# remote_src: yes
|
||||
# src: "{{ iiab_download_url }}/mongodb_stretch_3_0_14_core.zip"
|
||||
# dest: "{{ downloads_dir }}/mongodb-3.0.1x"
|
||||
# when: internet_available and is_rpi
|
||||
# when: internet_available and is_raspbian
|
||||
#
|
||||
#- name: Install (copy) 3 binaries from /opt/iiab/downloads/mongodb-3.0.1x/core to /usr/bin (rpi)
|
||||
# copy:
|
||||
|
@ -67,14 +67,14 @@
|
|||
# dest: /usr/bin
|
||||
# with_fileglob:
|
||||
# - "{{ downloads_dir }}/mongodb-3.0.1x/core/*"
|
||||
# when: internet_available and is_rpi
|
||||
# when: internet_available and is_raspbian
|
||||
#
|
||||
#- name: Download & unzip MongoDB 3.0.15's 9 tools binaries to /opt/iiab/downloads/mongodb-3.0.1x (rpi)
|
||||
# unarchive:
|
||||
# remote_src: yes
|
||||
# src: "{{ iiab_download_url }}/mongodb_stretch_3_0_14_tools.zip"
|
||||
# dest: "{{ downloads_dir }}/mongodb-3.0.1x"
|
||||
# when: internet_available and is_rpi
|
||||
# when: internet_available and is_raspbian
|
||||
#
|
||||
#- name: Install (copy) 9 binaries from /opt/iiab/downloads/mongodb-3.0.1x/tools to /usr/bin (rpi)
|
||||
# copy:
|
||||
|
@ -82,13 +82,13 @@
|
|||
# dest: /usr/bin
|
||||
# with_fileglob:
|
||||
# - "{{ downloads_dir }}/mongodb-3.0.1x/tools/*"
|
||||
# when: internet_available and is_rpi
|
||||
# when: internet_available and is_raspbian
|
||||
|
||||
- name: Create Linux group mongodb (rpi)
|
||||
group:
|
||||
name: mongodb
|
||||
state: present
|
||||
when: is_rpi | bool
|
||||
when: is_raspbian | bool
|
||||
|
||||
- name: Create Linux user mongodb (rpi)
|
||||
user:
|
||||
|
@ -97,7 +97,7 @@
|
|||
groups: mongodb
|
||||
home: /var/lib/mongodb
|
||||
shell: /usr/sbin/nologin
|
||||
when: is_rpi | bool
|
||||
when: is_raspbian | bool
|
||||
|
||||
|
||||
# 2. CONFIGURE MongoDB FOR IIAB
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
|
||||
- name: "Globally 'npm install' 8 Node-RED learning examples for RPi: node-red-contrib-ibm-watson-iot, node-red-contrib-play-audio, node-red-node-ledborg, node-red-node-ping, node-red-node-pi-sense-hat, node-red-node-random, node-red-node-serialport, node-red-node-smooth"
|
||||
command: npm install -g --unsafe-perm node-red-contrib-ibm-watson-iot node-red-contrib-play-audio node-red-node-ledborg node-red-node-ping node-red-node-pi-sense-hat node-red-node-random node-red-node-serialport node-red-node-smooth
|
||||
when: nodered_install and internet_available and is_rpi
|
||||
when: nodered_install and internet_available and is_raspbian
|
||||
|
||||
## To protect pre-installed packages within /usr/lib/node_modules in graphical
|
||||
## desktop OS's like Raspbian Desktop & Ubermix, we now only install those that
|
||||
|
@ -89,10 +89,10 @@
|
|||
# when: nodered_install and internet_available
|
||||
|
||||
- include_tasks: group.yml
|
||||
when: nodered_install and not is_rpi
|
||||
when: nodered_install and not is_raspbian
|
||||
|
||||
- include_tasks: rpi_desk.yml
|
||||
when: nodered_install and internet_available and is_rpi
|
||||
when: nodered_install and internet_available and is_raspbian
|
||||
|
||||
- name: Install /etc/systemd/system/nodered.service systemd unit file from template
|
||||
template:
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
#- name: Replace/Tweak "node-red-contrib-ibm-watson-iot/examples/Pi cpu temperature.json" (rpi)
|
||||
# command: 'curl -sL -o /usr/lib/node_modules/node-red-contrib-ibm-watson-iot/examples/Pi\ cpu\ temperature.json https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/Pi%20cpu%20temperature.json'
|
||||
# when: nodered_install and internet_available and is_rpi
|
||||
# when: nodered_install and internet_available and is_raspbian
|
||||
|
||||
- name: 'Download/Install 4 RPi executables to /usr/bin: node-red-start, node-red-stop, node-red-restart, node-red-log'
|
||||
get_url:
|
||||
|
|
|
@ -5,7 +5,7 @@ After=syslog.target network.target
|
|||
[Service]
|
||||
# Ansible template HAD: if is_debian_8 or is_debian_9 or is_ubuntu_16 or is_ubuntu_17
|
||||
# Ansible template HAD: if is_debuntu
|
||||
{% if is_rpi %}
|
||||
{% if is_raspbian %}
|
||||
ExecStart=/usr/bin/node-red-pi --max-old-space-size=128 -v
|
||||
{% else %}
|
||||
# ExecStart=/usr/local/bin/node-red-pi --max-old-space-size=128 -v
|
||||
|
@ -19,7 +19,7 @@ SyslogIdentifier=node-red
|
|||
StandardOutput=syslog
|
||||
|
||||
# non-root user to run as
|
||||
{% if is_rpi %}
|
||||
{% if is_raspbian %}
|
||||
WorkingDirectory=/home/pi/
|
||||
User=pi
|
||||
Group=pi
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
group: root
|
||||
#mode: ????
|
||||
remote_src: yes
|
||||
when: is_rpi | bool
|
||||
when: is_raspbian | bool
|
||||
|
||||
- name: Unarchive http://download.iiab.io/packages/php{{ php_version }}-stem.x64.tar to / (x64)
|
||||
unarchive:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue