Skip to content

Commit 7b51118

Browse files
aduh95richardlau
andauthored
ansible: update Node.js from 12.x -> 14.x (#2514)
* ansible: update Node.js from 12.x -> 14.x Fixes: #2504 * ansible: update cache after adding NodeSource repo After adding the NodeSource repository for Node.js, set `update_cache` on the subsequent "Install node" `package` task to run the equivalent of `apt-get update` to fetch the package metadata from the newly added repository. * ansible: remove previous NodeSource repo Co-authored-by: Richard Lau <[email protected]>
1 parent 7642d19 commit 7b51118

File tree

1 file changed

+7
-1
lines changed
  • ansible/roles/jenkins-workspace/tasks

1 file changed

+7
-1
lines changed

ansible/roles/jenkins-workspace/tasks/main.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,19 @@
114114

115115
- name: Add nodesource repo
116116
apt_repository:
117-
repo: deb https://deb.nodesource.com/node_12.x xenial main
117+
repo: deb https://deb.nodesource.com/node_14.x xenial main
118118
state: present
119119

120+
- name: Remove earlier nodesource repos
121+
apt_repository:
122+
repo: deb https://deb.nodesource.com/node_12.x xenial main
123+
state: absent
124+
120125
- name: Install node
121126
package:
122127
name: nodejs
123128
state: present
129+
update_cache: yes
124130

125131
- name: Upgrade pip2
126132
pip:

0 commit comments

Comments
 (0)