Pin nodejs to come from nodesource repo

We're installing the nodesource repo, that means we want to install
from it even if the distro happens to have a newer version.

Change-Id: Ib37615089a2b11b8cc8bdfbe811e5f9cb3d1a529
This commit is contained in:
Monty Taylor 2019-03-14 16:50:54 +00:00
parent b2c5e4a132
commit 2f4a997498
2 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,3 @@
Package: nodejs
Pin: origin deb.nodesource.com
Pin-Priority: 900

View File

@ -9,6 +9,12 @@
state: present
become: yes
- name: Pin nodejs installs to nodesource
copy:
src: 00-nodesource.pref
dest: /etc/apt/preferences.d/00-nodesource.pref
become: yes
- name: Add nodesource repository key
apt_key:
url: "https://deb.nodesource.com/gpgkey/nodesource.gpg.key"