Chef resource for nodenv installs, configuration and management of node versions.
cookbook 'nodenv', '~> 1.0.2'You can choose whether a user or a system install (or both). Check test recipes for working examples.
nodenv_user 'user'| Property | Type | Default | Details |
|---|---|---|---|
:user |
String | must be and existing user, acts as name property | |
:nodenv_root |
String | :user's home |
a directory that must be writable by :user |
:git_url |
String | https://github.com/nodenv/nodenv.git | a valid git url |
:git_revision |
String | master | choose a branch |
nodenv_system 'system'| Property | Type | Default | Details |
|---|---|---|---|
:nodenv_root |
String | /usr/local/nodenv |
|
:git_url |
String | https://github.com/nodenv/nodenv.git | a valid git url |
:git_revision |
String | master | choose a branch |
Commands without user property will assume system-wide installation.
Install a node version for user/system nodenv.
nodenv_install '8.2.1' do
user 'user'
end
nodenv_install '9.5.0'| Property | Type | Default | Details |
|---|---|---|---|
:version |
String | must be a valid node version, acts as name property | |
:user |
String | root |
must be an existing user |
Set a global node version for user/system-wide nodenv.
nodenv_global '8.2.1' do
user 'user'
end
nodenv_global '9.5.0'| Property | Type | Default | Details |
|---|---|---|---|
:version |
String | must be installed node versions, acts as name property | |
:user |
String | root |
must be an existing user |
Check Test Kitchen.
- dokken:
KITCHEN_LOCAL_YAML=kitchen.dokken.yml kitchen test - vagrant/virtualbox:
kitchen test
Check kitchen converge docs.
Based in ruby_rbenv.