Skip to content

Ansible role which provisions nodejs and npm modules using nvm

License

Notifications You must be signed in to change notification settings

dskindell/ansible-role-nodejs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Role: NodeJS

Build Status stability-stable Ansible Nodejs MIT licensed

  • Installs NVM (Node Version Manager)
  • Installs IVM (IOJS Version Manager) when configured
  • Installs Node.js v4, v5, v6, v7, v8 and v9 (uses NVM - Node Javascript Library)
  • Installs IOJS when configured
  • Installs NPM packages (Node Package Manager)

Requirements

None.

Role Variables

Default Node version

node_version: 10.5.0

All Node versions to install

node_versions:
  - 4.9.1
  - 5.12.0
  - 6.14.3
  - 7.10.1
  - 8.11.3
  - 9.11.2

Node packages to download

node_packages:
  - { name: backbone }
  - { name: grunt }
  - { name: underscore }
  - { name: yosay }

Note: In order to install IOJS versions via IVM, configure both IVM and IOJS tasks to execute as follows:

install_ivm: true
install_iojs: true
node_version: 3.0.0
node_versions:
- 1.0.0
- 2.0.0

Note: In order for this role to do what it does, it uses a script which includes the nvm script to make the function available. This is stored as a file which is then executed from the $PATH. You may configure where the file is stored for execution, however the task associated to this is executed by the root user.

nvm_symlink_exec: /usr/local/bin/nvm

Dependencies

None.

Example Playbook

- hosts: localhost
  roles:
    - fubarhouse.nodejs

License

MIT / BSD

Author Information

This role was created in 2015 by Karl Hepworth.

About

Ansible role which provisions nodejs and npm modules using nvm

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%