Commit 37074c1b by Jocelyn Delalande

jupyterhub: get node/npm from nodesource

parent c8a296a9
# This first task is actually required by ijavascript
# to get a recent version of node (jessie-backports contains one, but with no
# npm…)
# Seems un-needed on strecth (but not tested)
- name: Install node from nodesource as ijs wont run with node 0.10x
include: nodesource.yml
- name: install apt dependencies
apt: pkg={{ item }} update_cache=yes cache_valid_time=1800
with_items:
- npm
- nodejs-legacy
#- npm # Taken care by nodesource step
#- nodejs-legacy # Taken care by nodesource step
- virtualenv
- python3-dev
......
# Install Node.js using packages crafted by NodeSource
# After https://github.com/nodesource/ansible-nodejs-role, MIT License
---
- name: Ensure the system can use the HTTPS transport for APT
stat:
path: /usr/lib/apt/methods/https
register: apt_https_transport
- name: Install HTTPS transport for APT
apt:
pkg: apt-transport-https
state: installed
when: not apt_https_transport.stat.exists
- name: Import the NodeSource GPG key into apt
apt_key:
url: https://keyserver.ubuntu.com/pks/lookup?op=get&fingerprint=on&search=0x1655A0AB68576280
id: "68576280"
state: present
- name: Add NodeSource deb repository
apt_repository:
repo: 'deb https://deb.nodesource.com/node_4.x {{ ansible_distribution_release }} main'
state: present
- name: Add NodeSource deb-src repository
apt_repository:
repo: 'deb-src https://deb.nodesource.com/node_4.x {{ ansible_distribution_release }} main'
state: present
- name: Add NodeSource repository preferences
template:
src: deb_nodesource_com_node.pref.j2
dest: /etc/apt/preferences.d/deb_nodesource_com_node.pref
- name: Install Node.js
apt:
pkg: nodejs
state: installed
update_cache: yes
\ No newline at end of file
# {{ ansible_managed }}
Package: *
Pin: release o=Node Source
Pin-Priority: 500
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment