This ansible role is used to install NVM, Node Version Manager, locally within a linux box.
This role requires git, curl, build-essential, libssl-dev. Requirements are installed by this role.
Required Variables
-
nvm_user
This should be the remote user that will use NVM. This value defaults to 'vagrant'. -
nvm_group
This optional variable is the remote group that will be used to setup permissions. If undefined, will fallback tonvm_user
.
Optional Variables
nvm_version: "v0.35.2"
NVM version to install on remote machine, it defaults tov0.35.2
. You must specify a distinct NVM version, do NOT use wild cards (i.e.v0.24.x
).nvm_node_version: "12.14.1"
Node version to install on the remote machine, it defaults to12.14.1
. You must specify a distinct node version, do NOT use wild cards (i.e.12.14.x
).
No dependencies.
- hosts: all
roles:
- role: moviedo.nvm
nvm_user: vagrant
nvm_version: "v0.35.2"
nvm_node_version: "12.14.1"
This role will also run nvm alias default
on the specified nvm_node_version to set a default Node version to be used in any new shell.
Information on how to contribute to the project.
How to setup the project for local development.
-
Fork the repo.
-
Make your desired changes.
-
Write your tests in the molecule/default/test/test_default.py file or add test in a different file if needed.
-
Test said desired changes using molecule.
Molecule is used to test again different OS platforms(i.e. ubuntu, centos, etc).
-
Test against multiple ansible versions with tox.
-
Make a merge request to the project.
Check the testing section for more info on commands to run for testing locally.
Information on what commands to run in order to test locally.
- Run the
molecule test
command to test the all scenarios. - Run the
molecule verify
to test against the testinfra test. Used to verify that the role makes the desired changes against the docker images.
Run tox --parallel auto
to test changes against the different ansible version that this role supports.
Warning: taking a few minutes to run all tests.
MIT
Mauro Oviedo (aka moviedo)