coopdevs / coopdevs/donalo

nvm doens't find the installed node version

Open
#39 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jinja
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Description

## Problem

Although https://github.com/coopdevs/donalo/pull/38 ran successfully as the output states below

```
TASK [stephdewit.nvm : Install dependencies] ***********************************
skipping: [next.donalo.org]

TASK [stephdewit.nvm : Install dependencies] ***********************************
ok: [next.donalo.org]

TASK [stephdewit.nvm : Install nvm 0.33.11] ************************************
changed: [next.donalo.org]

TASK [stephdewit.nvm : Update ~/.profile to source nvm] ************************
changed: [next.donalo.org]

TASK [stephdewit.nvm : Install Node.js 10.15.3] ********************************
ok: [next.donalo.org]

TASK [stephdewit.nvm : Check if 10.15.3 is the default Node.js version] ********
ok: [next.donalo.org]

TASK [stephdewit.nvm : Set default Node.js version to 10.15.3] *****************
skipping: [next.donalo.org]
```

when you log into the machine, `nvm` can't find any node version installed

```
onalo@staging:~$ nvm list
N/A
node -> stable (-> N/A) (default)
iojs -> N/A (default)
```

So I had to perform the exact same steps the https://github.com/stephdewit/ansible-nvm performs:

```
donalo@staging:~$ nvm install 10.15.3
Downloading and installing node v10.15.3...
Downloading https://nodejs.org/dist/v10.15.3/node-v10.15.3-linux-x64.tar.xz...
################################################################################################################################################################################ 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v10.15.3 (npm v6.4.1)
Creating default alias: default -> 10.15.3 (-> v10.15.3)
donalo@staging:~$ . .profile && nvm ls --no-colors
-> v10.15.3 *
default -> 10.15.3 (-> v10.15.3 *)
node -> stable (-> v10.15.3 *) (default)
stable -> 10.15 (-> v10.15.3 *) (default)
iojs -> N/A (default)
lts/* -> lts/erbium (-> N/A)
lts/argon -> v4.9.1 (-> N/A)
lts/boron -> v6.17.1 (-> N/A)
lts/carbon -> v8.16.2 (-> N/A)
lts/dubnium -> v10.17.0 (-> N/A)
lts/erbium -> v12.13.1 (-> N/A)
donalo@staging:~$ nvm alias default 10.15.3
default -> 10.15.3 (-> v10.15.3)
```

## Potential root causes

We must be missing something related to the user that executes the Ansible role because my manual intervention should be equivalent. The only difference I see is that said role uses the `shell` module which runs `/bin/sh` although its tasks do source `~/.profile`.

Something else I wondering about is whether these lines

https://github.com/coopdevs/donalo/blob/4c791f89b5d6f4ba698857c2eeb03416e167a075/playbooks/provision.yml#L33-L34

are really working.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.