Created
October 17, 2013 00:53
-
-
Save dstokes/7017565 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: all | |
sudo: yes | |
vars: | |
- nodejs_version: 0.10.20 | |
tasks: | |
- name: Install node / npm depencencies | |
apt: pkg={{ item }} state=present | |
with_items: | |
# for compiling npm binary modules | |
- build-essential | |
- name: Create package stub variable for convenience | |
shell: echo node-v${nodejs_version}-linux-x64 | |
register: pkg_stub | |
- name: Get nodejs tarball | |
get_url: | |
dest: /usr/local/src/${pkg_stub.stdout}.tar.gz | |
url: http://nodejs.org/dist/v${nodejs_version}/${pkg_stub.stdout}.tar.gz | |
- name: Install nodejs binary (${nodejs_version}) | |
shell: > | |
tar xf /usr/local/src/${pkg_stub.stdout}.tar.gz | |
--strip-components=1 --no-same-owner | |
-C /usr/local | |
${pkg_stub.stdout}/bin | |
${pkg_stub.stdout}/lib | |
${pkg_stub.stdout}/share |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment