Skip to content

Instantly share code, notes, and snippets.

@auser
Created June 7, 2013 20:47
Show Gist options
  • Select an option

  • Save auser/5732313 to your computer and use it in GitHub Desktop.

Select an option

Save auser/5732313 to your computer and use it in GitHub Desktop.
git_packages:
pkg.installed:
- names:
- libssl-dev
- git
- pkg-config
- build-essential
- curl
- gcc
- g++
- checkinstall
## Get Node
get-node:
file.managed:
- name: /usr/src/node-v{{ pillar['node']['version'] }}.tar.gz
- source: http://nodejs.org/dist/v{{ pillar['node']['version'] }}/node-v{{ pillar['node']['version'] }}.tar.gz
- source_hash: {{ pillar['node']['checksum'] }}
- require:
- pkg: git_packages
cmd.wait:
- cwd: /usr/src
- names:
- tar -zxvf node-v{{ pillar['node']['version'] }}.tar.gz
- watch:
- file: node-{{ pillar['node']['version'] }}
make-node:
cmd.wait:
- cwd: /usr/src/node-v{{ pillar['node']['version'] }}
- names:
- ./configure
- make
- checkinstall --install=yes --pkgname=nodejs --pkgversion "{{pillar['node']['version'] }}" --default
- watch:
- cmd: get-node
node:
version: 0.8.20
checksum: sha1=b780f58f0e3bc43d2380d4a935f2b45350783b37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment