summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2019-03-14 19:05:36 +0000
committerGerrit Code Review <review@openstack.org>2019-03-14 19:05:36 +0000
commit7d2d3751f0ef81bad8ae18a1e71afe8732f5e52f (patch)
tree7ec9ed14cee9202d35caffa74b2a3913eb0e58e7
parent19355963673727d6529d8c41cfd459cbf688f36c (diff)
parent2f4a997498cbb77a5e49dfb23621dbe5432953e1 (diff)
Merge "Pin nodejs to come from nodesource repo"
-rw-r--r--roles/install-nodejs/files/00-nodesource.pref3
-rw-r--r--roles/install-nodejs/tasks/main.yaml6
2 files changed, 9 insertions, 0 deletions
diff --git a/roles/install-nodejs/files/00-nodesource.pref b/roles/install-nodejs/files/00-nodesource.pref
new file mode 100644
index 0000000..c830506
--- /dev/null
+++ b/roles/install-nodejs/files/00-nodesource.pref
@@ -0,0 +1,3 @@
1Package: nodejs
2Pin: origin deb.nodesource.com
3Pin-Priority: 900
diff --git a/roles/install-nodejs/tasks/main.yaml b/roles/install-nodejs/tasks/main.yaml
index 84dcd1d..44b7dde 100644
--- a/roles/install-nodejs/tasks/main.yaml
+++ b/roles/install-nodejs/tasks/main.yaml
@@ -9,6 +9,12 @@
9 state: present 9 state: present
10 become: yes 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- name: Add nodesource repository key 18- name: Add nodesource repository key
13 apt_key: 19 apt_key:
14 url: "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" 20 url: "https://deb.nodesource.com/gpgkey/nodesource.gpg.key"