Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade node #36

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
nodejs_playbook_version: "0.1.7"
nodejs_install_source: build #One of: build (from source), nodesource_debs (works only on debian-based distros)
nodejs_version: "0.10.36"
nodejs_version: "0.10.48"
nodejs_path: "/usr/local/"
nodejs_tmp_dir: "/tmp/"
nodejs_global_packages:
Expand All @@ -11,7 +11,7 @@ nodejs_global_packages:
nodejs_version_tag: "v{{nodejs_version}}"
nodejs_file_tag: "node-{{nodejs_version_tag}}"
nodejs_file_name: "{{nodejs_file_tag}}.tar.gz"
nodejs_base_url: "http://nodejs.org/dist/v{{nodejs_version}}/"
nodejs_base_url: "https://nodejs.org/dist/v{{nodejs_version}}/"
nodejs_tarball_url: "{{nodejs_base_url}}{{nodejs_file_name}}"
nodejs_shasum_file: "{{(nodejs_version | version_compare('1.0.0', '>=')) | ternary('SHASUMS256.txt', 'SHASUMS.txt')}}"
nodejs_shasum_url: "{{nodejs_base_url}}{{nodejs_shasum_file}}"
Expand Down
3 changes: 1 addition & 2 deletions tasks/install_from_source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@
when: wanted_version_installed.rc == 1

- name: Unpack nodejs {{nodejs_version_tag}}
command: tar -xvzf {{nodejs_file_name}} chdir={{nodejs_tmp_dir}}
command: tar -xzf {{nodejs_file_name}} chdir={{nodejs_tmp_dir}}
when: wanted_version_installed.rc == 1

- name: Compile and install nodejs {{nodejs_version_tag}}
shell: ./configure --prefix={{nodejs_path}} && make && make install chdir={{nodejs_tmp_dir}}{{nodejs_file_tag}}
sudo: true
when: wanted_version_installed.rc == 1