Skip to content

Instantly share code, notes, and snippets.

@siygle
Forked from avimar/gist:3092732
Last active December 10, 2015 17:38
Show Gist options
  • Save siygle/4468676 to your computer and use it in GitHub Desktop.
Save siygle/4468676 to your computer and use it in GitHub Desktop.
Install nodejs with salt under ubuntu env
nodejs-deps:
pkg.installed:
- names:
- build-essential
- g++
- curl
- libssl-dev
- apache2-utils
- git
nodejs-source:
git.latest:
- target: /usr/src/nodejs
- name: git://github.com/joyent/node.git
- rev: v0.8.4-release #choose version you want
nodejs-install:
cmd.run:
- cwd: /usr/src/nodejs
- name: ./configure && make && make install
- onlyif: if [ -z $(node --version) ] || [ $(node --version) != "v0.8.4" ]; then echo "should update"; else exit 1; fi;
- require:
- git: nodejs-source
- pkg: nodejs-deps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment