Commit 8a12676f by Dóbé Péter

Debian 9 npm/nodejs fix

parent 365c2a84
{% if grains['os'] == 'Ubuntu' or grains['os'] == 'Debian' %} {% if grains['os'] == 'Debian' and grains['oscodename'] == 'stretch' %}
{# Debian 9 stretch has no npm.
Using nodesource repo where nodejs package provides npm. #}
nodesource-repo:
pkgrepo.managed:
- humanname: Nodesource Repository
- name: deb http://deb.nodesource.com/node_6.x stretch main
- dist: stretch
- file: /etc/apt/sources.list.d/nodesource.list
# - key_url: 'https://deb.nodesource.com/gpgkey/nodesource.gpg.key'
- keyid: '68576280'
- keyserver: keys.gnupg.net
- require-in:
- pkg: npm
- require:
- pkg: python-apt
python-apt:
pkg.installed
{% endif %}
{% if grains['os'] == 'Ubuntu' or ( grains['os'] == 'Debian' and grains['oscodename'] != 'stretch' ) %}
nodejs-legacy: nodejs-legacy:
pkg.installed pkg.installed
{% endif %} {% endif %}
npm: npm:
{% if grains['os'] == 'Ubuntu' or grains['os'] == 'Debian' %} {% if grains['os'] == 'Debian' and grains['oscodename'] == 'stretch' %}
{# nodesource nodejs package has executables node, nodejs, npm #}
pkg.installed:
- name: nodejs
{% elif grains['os'] == 'Ubuntu' or grains['os'] == 'Debian' %}
pkg.installed: pkg.installed:
- require: - require:
- pkg: nodejs-legacy - pkg: nodejs-legacy
......
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 sign in to comment