We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a109d68 commit 3c2b2a7Copy full SHA for 3c2b2a7
ansible/roles/dev-desktop/tasks/main.yml
@@ -186,10 +186,22 @@
186
- gcc-multilib # for 32 bit cross compiles of libstd and tests
187
state: present
188
189
-- name: Install Nodejs
+- name: Check if Node is installed
190
+ command: node --version
191
+ register: node_version
192
+ changed_when: false
193
+ failed_when: node_version.rc != 0 and node_version.rc != 2
194
+
195
+- name: Set up NodeSource repository
196
shell: |
197
curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
- apt-get install -y nodejs
198
+ when: node_version.rc == 2
199
200
+- name: Install Node
201
+ apt:
202
+ name: nodejs
203
+ state: present
204
+ update_cache: yes
205
206
- name: Set up the git credential helper user
207
user:
0 commit comments