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

Merge pull request #2275 from jvonau/is_rpi

Kill off is_rpi
This commit is contained in:
A Holt 2020-03-09 12:14:24 -04:00 committed by GitHub
commit f9b2c51d41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 76 additions and 107 deletions

View file

@ -41,6 +41,7 @@ else
echo -e "\nPlease run: ./iiab-install"
exit 1
fi
cp ./scripts/local_facts.fact /etc/ansible/facts.d/local_facts.fact
# Workaround for (web-published) images; will go away later
if grep -q sugar $IIAB_STATE_FILE && ! grep -q mongodb $IIAB_STATE_FILE; then

View file

@ -1,3 +1,3 @@
- name: Install nodogsplash (Raspbian only)
include_tasks: rpi.yml
when: is_rpi | bool
when: is_raspbian | bool

View file

@ -7,7 +7,6 @@
# These are defaults for boolean routines.
first_run: False
rpi_model: none
is_rpi: False
xo_model: none
gw_active: False
internet_available: False

View file

@ -37,3 +37,5 @@
value: "{{ ansible_date_time.iso8601 }}"
- option: install_xo
value: "{{ xo_model }}"
- option: is_rpi
value: "{{ rpi_model }}"

View file

@ -9,6 +9,13 @@
first_run: True
when: not NewInstall.stat.exists
- name: Set top-level variables from local_facts for convenience
set_fact:
rpi_model: "{{ ansible_local.local_facts.rpi_model }}"
xo_model: "{{ ansible_local.local_facts.xo_model }}"
phplib_dir: "{{ ansible_local.local_facts.phplib_dir }}"
iiab_stage: "{{ ansible_local.local_facts.stage }}"
# We need to inialize the ini file and only write the location and version
# sections once and only once to preserve the install date and git hash.
- name: Create IIAB tools and {{ iiab_ini_file }}, if first_run
@ -55,20 +62,6 @@
# fail_msg: "PLEASE CONFIRM 'apache_install: True' AND 'apache_enable: True' IF 'nginx_enabled: False' e.g. IN: /etc/iiab/local_vars.yml"
# quiet: yes
- name: Set top-level variables from local_facts for convenience
set_fact:
xo_model: "{{ ansible_local.local_facts.xo_model }}"
phplib_dir: "{{ ansible_local.local_facts.phplib_dir }}"
iiab_stage: "{{ ansible_local.local_facts.stage }}"
- name: Discover if this is running Raspbian -- if so assume it is an RPi
set_fact:
rpi_model: "rpi"
is_rpi: True
#no_net_restart: True
#nobridge: True
when: ansible_local.local_facts.os == "raspbian"
- name: Set exFAT_enabled if xo_model != "none"
set_fact:
exFAT_enabled: True
@ -217,7 +210,7 @@
- option: internet_available
value: "{{ internet_available }}"
- option: is_rpi
value: "{{ is_rpi }}"
value: "{{ rpi_model }}"
- option: first_run
value: "{{ first_run }}"
- option: local_tz

View file

@ -37,7 +37,7 @@
path: /etc/dphys-swapfile
regexp: "^CONF_SWAPSIZE"
line: "CONF_SWAPSIZE={{ pi_swap_file_size }}"
when: is_debuntu | bool # Redundant, given raspberry_pi.yml is only run when rpi_model: "rpi" (similar to is_rpi: True). Until someone tries a non-debuntu OS on RPi?
when: is_debuntu | bool # Redundant, given raspberry_pi.yml is only run when rpi_model: != "none" Until someone tries a non-debuntu OS on RPi?
- name: Restart swap service "dphys-swapfile" (debuntu)
#command: /etc/init.d/dphys-swapfile restart

View file

@ -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:

View file

@ -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:

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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:

View file

@ -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:

View file

@ -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

View file

@ -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

View file

@ -135,18 +135,7 @@
- name: LAN configured - 'Gateway' mode
set_fact:
iiab_network_mode: "Gateway"
when: is_rpi or (not (iiab_lan_iface == "none") and not (iiab_wan_iface == "none"))
- name: Force iiab_lan_iface if is_rpi
set_fact:
iiab_lan_iface: "br0"
iiab_wireless_lan_iface: "wlan0"
when: is_rpi | bool
- name: Enable hostapd if discovered_wireless_iface is not WAN
set_fact:
hostapd_enabled: True
when: is_rpi and not (iiab_wan_iface == discovered_wireless_iface)
when: (not (iiab_lan_iface == "none") and not (iiab_wan_iface == "none"))
# override with user_lan_iface setting if no longer in auto
- name: Setting user LAN fact

View file

@ -41,13 +41,13 @@
template:
dest: /etc/network/interfaces.d/iiab
src: network/systemd.j2
when: not is_rpi and (iiab_lan_iface == "br0" or wan_ip != "dhcp" or gui_static_wan_ip == "undefined")
when: not is_raspbian (iiab_lan_iface == "br0" or wan_ip != "dhcp" or gui_static_wan_ip == "undefined")
- name: Copy the bridge script for RPi
template:
dest: /etc/network/interfaces.d/iiab
src: network/rpi.j2
when: is_rpi and iiab_lan_iface == "br0"
when: is_raspbian and iiab_lan_iface == "br0"
- name: Workaround auto issue - ifupdown compatibility mode (debian-9+)
template:
@ -62,24 +62,7 @@
regexp: "{{ iiab_wan_iface }}"
when: wan_ip != "dhcp" and iiab_wan_iface != "none" and is_debian and not is_debian_8
- name: BIND may be affected
service:
name: "{{ dns_service }}"
state: stopped
when: named_install and dnsmasq_enabled
# dhcpd_server release the interface
- name: dhcpd_server may be affected - stopping dhcpd
service:
name: dhcpd
state: stopped
when: dhcpd_install | bool
- name: dhcpd_server may be affected - stopping dnsmasq
service:
name: dnsmasq
state: stopped
when: dnsmasq_install | bool
- include_tasks: down-debian.yml
- name: Reload systemd
systemd:

View file

@ -141,7 +141,7 @@
- name: Set iiab_wired_lan_iface if present
set_fact:
iiab_wired_lan_iface: "{{ discovered_wired_iface }}"
when: discovered_wired_iface is defined and discovered_wired_iface != "none" and discovered_wired_iface != iiab_wan_iface and not is_rpi
when: discovered_wired_iface is defined and discovered_wired_iface != "none" and discovered_wired_iface != iiab_wan_iface and not is_raspbian
#unused
#- name: Get a list of ifcfg files to delete
@ -151,14 +151,14 @@
- name: 2 or more devices on the LAN - use bridging
set_fact:
iiab_lan_iface: br0
when: num_lan_interfaces|int >= 2 and not is_rpi
when: num_lan_interfaces|int >= 2
- name: For Debian, always use bridging - except RPi
- name: For Debian, always use bridging
set_fact:
iiab_lan_iface: br0
when: num_lan_interfaces|int >= 1 and is_debuntu and not is_rpi
when: num_lan_interfaces|int >= 1 and is_debuntu
- name: WiFi is on the LAN - use bridging - except RPi
- name: WiFi is on the LAN - use bridging
set_fact:
iiab_lan_iface: br0
when: iiab_wireless_lan_iface is defined and not nobridge is defined

View file

@ -98,7 +98,6 @@
when: dnsmasq_install and dnsmasq_enabled and nd_dir.stat.exists and nd_dir.stat.isdir and (iiab_network_mode != "Appliance")
#when: dnsmasq_install and dnsmasq_enabled and nd_enabled is defined and nd_enabled.stdout == "enabled" and nd_dir.stat.exists and nd_dir.stat.isdir and (iiab_network_mode != "Appliance")
#when: dnsmasq_install and dnsmasq_enabled and systemd_out.status.UnitFileState == "enabled" and networkd_dir.stat.exists and networkd_dir.stat.isdir and (iiab_network_mode != "Appliance")
#when: dnsmasq_enabled and dnsmasq_install and (iiab_network_mode != "Appliance") and (not is_rpi) and (not is_ubuntu_16)
- name: Remove /etc/dnsmasq.d/iiab.conf, when not dnsmasq_enabled or is Appliance
file:

View file

@ -37,7 +37,7 @@
owner: root
group: root
mode: 0755
when: is_rpi | bool
when: is_raspbian | bool
- name: Create /usr/bin/iiab-hotspot-off from template
template:
@ -46,7 +46,7 @@
owner: root
group: root
mode: 0755
when: is_rpi | bool
when: is_raspbian | bool
- name: Disable the Access Point 'hostapd' service
systemd:

View file

@ -22,7 +22,7 @@
# iiab_wan_iface: "{{ discovered_wired_iface }}"
# iiab_wireless_lan_iface: "{{ discovered_wireless_iface }}"
# iiab_wired_lan_iface: ""
# when: is_rpi and discovered_wireless_iface is defined and discovered_wireless_iface == iiab_wan_iface and reboot_to_AP
# when: is_raspbian and discovered_wireless_iface is defined and discovered_wireless_iface == iiab_wan_iface and reboot_to_AP
- include_tasks: computed_network.yml
when: not installing #REMOVE THIS LINE IF installing IS ALWAYS false AS SET IN roles/0-init/defaults/main.yml
@ -33,7 +33,7 @@
# set_fact:
# no_net_restart: True
# hostapd_enabled: False
# when: is_rpi and discovered_wireless_iface is defined and discovered_wired_iface != iiab_wan_iface
# when: is_raspbian and discovered_wireless_iface is defined and discovered_wired_iface != iiab_wan_iface
##### Start static ip address info for first run #####
#- include_tasks: static.yml
@ -91,12 +91,12 @@
- name: RPi's have dhcpcd in use
include_tasks: rpi_debian.yml
when: is_debuntu and is_rpi
when: is_raspbian
#and not installing
- name: Not RPi, Not NetworkManager, Not systemd-networkd in use
include_tasks: debian.yml
when: (not is_rpi and not network_manager_active and not systemd_networkd_active and is_debuntu) or is_ubuntu_16
when: (not is_raspbian and not network_manager_active and not systemd_networkd_active and is_debuntu) or is_ubuntu_16
#and not installing
#### end network layout

View file

@ -42,9 +42,9 @@ slaac private
# Always (try) to run DHCP client on RPi's Ethernet port, for in-field
# "cablemodems" used by many non-technical operators, who want Zero-Hassle
# Updates. This means AVOIDING "denyinterfaces eth0" below:
{% if is_rpi and hostapd_enabled %}
{% if is_raspbian and hostapd_enabled %}
denyinterfaces{% if discovered_wireless_iface != "none" %} {{ discovered_wireless_iface }}{% endif %}
{% elif is_rpi %}
{% elif is_raspbian %}
#denyinterfaces{% if discovered_wireless_iface != "none" %} {{ discovered_wireless_iface }}{% endif %}
{% else %}
denyinterfaces{% if iiab_wireless_lan_iface is defined %} {{ iiab_wireless_lan_iface }}{% endif %}{% if iiab_wired_lan_iface is defined %} {{ iiab_wired_lan_iface }}{% endif %}

View file

@ -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:

View file

@ -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:

View file

@ -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

View file

@ -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:

View file

@ -56,6 +56,12 @@ else
XO_VERSION="none"
fi
if [ -f /proc/device-tree/model ]; then
RPI_VERSION=`cat /proc/device-tree/model`
else
RPI_VERSION="none"
fi
ANSIBLE_VERSION=$(ansible --version|head -n 1|cut -f 2 -d " ")
if [ ! x$DHCPCD_PATH = x ]; then
@ -77,6 +83,7 @@ cat <<EOF
"iiab_branch" : "$BRANCH",
"iiab_commit" : "$COMMIT",
"xo_model" : "$XO_VERSION",
"rpi_model" : "$RPI_VERSION",
"ansible_version" : "$ANSIBLE_VERSION",
"os" : "$OS",
"os_ver" : "$OS_VER"}

View file

@ -702,7 +702,6 @@ is_raspbian: False # Covers RPi HW and non-RPi HW versions of Raspbian
is_raspbian_10: False
is_raspbian_9: False
is_raspbian_8: False
is_rpi: False # 2019-03-23: Doesn't yet test for RPi HW, but hopefully soon: https://github.com/iiab/iiab/issues/1406
is_redhat: False # Not well supported as of 2019, see: https://github.com/iiab/iiab/issues/1434
is_centos: False

View file

@ -3,7 +3,6 @@ is_debian: True
is_debian_10: True
is_raspbian: True
is_raspbian_10: True
is_rpi: True
rtc_id: ds3231
# 2019-03-23: These apply if-only-if named_install and/or dhcpd_install are True

View file

@ -3,7 +3,6 @@ is_debian: True
is_debian_8: True
is_raspbian: True
is_raspbian_8: True
is_rpi: True
rtc_id: ds3231
# 2019-01-31: These apply if-only-if named_install and/or dhcpd_install are True

View file

@ -3,7 +3,6 @@ is_debian: True
is_debian_9: True
is_raspbian: True
is_raspbian_9: True
is_rpi: True
rtc_id: ds3231
# 2019-01-31: These apply if-only-if named_install and/or dhcpd_install are True