Browse Source

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
master
Monty Taylor 2 months ago
parent
commit
2f4a997498

+ 3
- 0
roles/install-nodejs/files/00-nodesource.pref View File

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

+ 6
- 0
roles/install-nodejs/tasks/main.yaml View File

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

Loading…
Cancel
Save