summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2019-03-14 16:50:54 +0000
committerMonty Taylor <mordred@inaugust.com>2019-03-14 16:50:54 +0000
commit2f4a997498cbb77a5e49dfb23621dbe5432953e1 (patch)
treebc868ec69df2c4b1be157737fbf20a7fa144056f
parentb2c5e4a1320ebe6661204342c65f10b487584e62 (diff)
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
Notes
Notes (review): Code-Review+2: Jeremy Stanley <fungi@yuggoth.org> Code-Review+2: Andreas Jaeger <jaegerandi@gmail.com> Workflow+1: Andreas Jaeger <jaegerandi@gmail.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Thu, 14 Mar 2019 19:05:36 +0000 Reviewed-on: https://review.openstack.org/643397 Project: openstack-infra/zuul-jobs Branch: refs/heads/master
-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"