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

attempt to future-proof Sugarizer for new distros

This commit is contained in:
A Holt 2019-01-15 14:05:43 -05:00 committed by GitHub
parent 5acd823020
commit ad6cef52ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -60,19 +60,23 @@
# 3. INSTALL A GOOD VERSION OF Node.js AND npm
- name: Set up Node.js 8.x apt sources (debuntu, but avoid ubuntu-18)
- name: Set up Node.js 8.x apt sources (debuntu distros up to 2017)
shell: curl -sL https://deb.nodesource.com/setup_8.x | bash -
args:
warn: no
when: internet_available and is_debuntu and not is_ubuntu_18
when: internet_available and (is_debian_8 or is_debian_9 or is_ubuntu_16 or is_ubuntu_17)
# NOT NEC TO TEST FOR is_raspbian_8 OR is_raspbian_9 AS /opt/iiab/iiab/vars/<OS>.yml
# DEFINES THESE AS SUBSETS OF is_debian_8 OR is_debian_9 (FOR NOW!)
- name: Install latest Node.js which includes /usr/bin/npm (debuntu, but avoid ubuntu-18)
- name: Install latest Node.js which includes /usr/bin/npm (debuntu distros up to 2017)
package:
name: nodejs
# name: nodejs=8.x
state: latest
# state: present
when: internet_available and is_debuntu and not is_ubuntu_18
when: internet_available and (is_debian_8 or is_debian_9 or is_ubuntu_16 or is_ubuntu_17)
# 2019-01-15: BORROWED BY https://github.com/iiab/iiab/blob/master/roles/nodered/tasks/main.yml#L1-L26
# 2018-07-14: BOTH STEPS ABOVE TAKE TIME, but Raspbian (apt offers npm
# 1.4.21) & Debian 9 (apt offers no npm!) STILL NEED the above
@ -93,13 +97,13 @@
# where it upgrades /usr/bin/npm in place:
# https://askubuntu.com/questions/1036278/npm-is-incorrect-version-on-latest-ubuntu-18-04-installation
- name: Install latest packages nodejs and npm (ubuntu-18 or not debuntu)
- name: Install latest packages nodejs and npm (debuntu distros after 2017, or other distros)
package:
name:
- nodejs
- npm
state: latest
when: internet_available and (is_ubuntu_18 or not is_debuntu)
when: internet_available and not (is_debian_8 or is_debian_9 or is_ubuntu_16 or is_ubuntu_17)
# 4. RUN "npm install" TO POPULATE ~35MB /opt/iiab/sugarizer-server/node_modules