From 5e4eadeef9b7791209d6c67a192f22c8e806640f Mon Sep 17 00:00:00 2001 From: A Holt Date: Tue, 29 Jan 2019 12:58:34 -0500 Subject: [PATCH] Update main.yml --- roles/nodejs/tasks/main.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/roles/nodejs/tasks/main.yml b/roles/nodejs/tasks/main.yml index 0f96ac7b8..b54553c9c 100644 --- a/roles/nodejs/tasks/main.yml +++ b/roles/nodejs/tasks/main.yml @@ -25,16 +25,20 @@ #- name: Install Node.js {{ nodejs_version }} which includes /usr/bin/npm (debuntu distros UP TO 2017) - name: Install Node.js {{ nodejs_version }} which includes /usr/bin/npm (debuntu) apt: - name: nodejs={{ nodejs_version }} # Nec to change above from 'package:' to 'apt:' ? + name: nodejs={{ nodejs_version }} + state: latest + # package: + # name: nodejs + # state: latest + # state: present when: internet_available and is_debuntu #when: internet_available and (is_debian_8 or is_debian_9 or is_ubuntu_16 or is_ubuntu_17) -- name: Install Node.js {{ nodejs_version }} which includes /usr/bin/npm (not debuntu) - package: - name: nodejs - state: latest - #state: present - when: internet_available and not is_debuntu +- name: Install Node.js {{ nodejs_version }} which includes /usr/bin/npm (redhat) + shell: curl -sL https://rpm.nodesource.com/setup_{{ nodejs_version }} | bash - + args: + warn: no + when: internet_available and is_redhat # 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