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

Add nodejs 5.x support for Debian systems #16

Merged
merged 1 commit into from
Feb 18, 2016
Merged
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
15 changes: 13 additions & 2 deletions tasks/setup-Debian.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
---
- name: Configure Debian repo version.
when: "'4' in nodejs_version"
set_fact:
debian_repo_version: "{{ nodejs_version if '4' not in nodejs_version else '4.x' }}"
debian_repo_version: "4.x"

- name: Configure Debian repo version.
when: "'5' in nodejs_version"
set_fact:
debian_repo_version: "5.x"

- name: Configure Debian repo version.
when: "'4' not in nodejs_version and '5' not in nodejs_version"
set_fact:
debian_repo_version: "{{ nodejs_version }}"

- name: Add Nodesource apt key.
apt_key:
Expand All @@ -17,4 +28,4 @@
- "deb-src https://deb.nodesource.com/node_{{ debian_repo_version }} {{ ansible_distribution_release }} main"

- name: Ensure Node.js and npm are installed.
apt: "name=nodejs={{ nodejs_version }}* state=present update_cache=yes"
apt: "name=nodejs={{ nodejs_version|regex_replace('x', '') }}* state=present update_cache=yes"