Skip to content

Ansible role for installing Node.js and any required global packages.

Notifications You must be signed in to change notification settings

rimmington/ansible-nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Node.js role for Ansible

Installs the latest version of Node.js from the chris-lea PPA.

Requirements

Tested on Ubuntu 12.04 Server.

Role Variables

The default variables are as follows:

nodejs_do_bower_install: false
nodejs_update_npm: false
nodejs_global_packages: []
nodejs_user: '{{ ansible_ssh_user }}'

Example Playbook

- hosts: 'servers'
  roles:
    - role: 'ssilab.nodejs'
      nodejs_update_npm: true               # If true, install the latest npm immediately after installing Node.js
      nodejs_user: 'hercules'
      nodejs_global_packages:
      	- 'bower'
      	- 'forever'
      	- 'gulp'
      	- 'nodemon'
      nodejs_app_root: '/path/to/my/app'    # If defined, 'npm install' will be run here
      nodejs_do_bower_install: true         # If true and nodejs_app_home is defined, 'bower install' will be run

License

This playbook is provided 'as-is' under the conditions of the BSD license. No fitness for purpose is guaranteed or implied.

About

Ansible role for installing Node.js and any required global packages.

Resources

Stars

Watchers

Forks

Packages

No packages published