mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Update main.yml
This commit is contained in:
parent
bb4430ef6d
commit
dccbd181ad
1 changed files with 21 additions and 8 deletions
|
@ -29,14 +29,20 @@
|
|||
# nodejs_version_installed.stderr == "/bin/sh: 1: nodejs: not found"
|
||||
# BOTH ABOVE (incl non-null stderr) are USED BELOW to confirm install is nec!
|
||||
|
||||
- name: "ENFORCE PRECONDITION: Stop installing (intentionally fail) IF an installed 'nodejs' version isn't {{ nodejs_version }}"
|
||||
fail:
|
||||
msg: >
|
||||
PLEASE REMOVE 'nodejs' VERSION {{ nodejs_version_installed.stdout }} AS
|
||||
IT DOES NOT MATCH THE REQUIRED nodejs_version: {{ nodejs_version }} --
|
||||
as set in /opt/iiab/iiab/vars/default_vars.yml and/or
|
||||
/etc/iiab/local_vars.yml -- then re-run this IIAB installer.
|
||||
when: nodejs_version_installed is defined and nodejs_version_installed.stdout != nodejs_version and nodejs_version_installed.stderr == ""
|
||||
#- name: "ENFORCE PRECONDITION: Stop installing (intentionally fail) IF an installed 'nodejs' version isn't {{ nodejs_version }}"
|
||||
# fail:
|
||||
# msg: >
|
||||
# PLEASE REMOVE 'nodejs' VERSION {{ nodejs_version_installed.stdout }} AS
|
||||
# IT DOES NOT MATCH THE REQUIRED nodejs_version: {{ nodejs_version }} --
|
||||
# as set in /opt/iiab/iiab/vars/default_vars.yml and/or
|
||||
# /etc/iiab/local_vars.yml -- then re-run this IIAB installer.
|
||||
# when: nodejs_version_installed is defined and nodejs_version_installed.stdout != nodejs_version and nodejs_version_installed.stderr == ""
|
||||
|
||||
- name: ASK apt/yum/dnf TO REMOVE PRE-EXISTING Node.js {{ nodejs_version_installed.stdout }} (IF IT'S NOT {{ nodejs_version }})
|
||||
package:
|
||||
name: nodejs
|
||||
state: absent
|
||||
when: nodejs_version_installed is defined and nodejs_version_installed.stdout != nodejs_version and nodejs_version_installed.stdout != ""
|
||||
|
||||
- name: Warn if Node.js {{ nodejs_version}} already installed & might be updated
|
||||
debug:
|
||||
|
@ -46,6 +52,13 @@
|
|||
|
||||
# 2. INSTALL Node.js USING nodesource.com
|
||||
|
||||
# SHOULD NOT BE NEC, AS STANZA BELOW SHOULD OVERWRITE /etc/apt/sources.list.d/nodesource.list REGARDLESS
|
||||
#- name: Clear prior /etc/apt/sources.list.d/nodesource.list (permitting downgrade if nec)
|
||||
# file:
|
||||
# path: /etc/apt/sources.list.d/nodesource.list
|
||||
# state: absent
|
||||
# when: internet_available and is_debuntu
|
||||
|
||||
- name: Set up Node.js {{ nodejs_version }} apt sources (debuntu)
|
||||
shell: curl -sL https://deb.nodesource.com/setup_{{ nodejs_version }} | bash -
|
||||
args:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue