From 1ddafbafcbbd360ba8a8d559fe2cd5d6b899231c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Mon, 9 Oct 2023 21:47:53 +0200 Subject: [PATCH] Read file --- roles/nodejs/tasks/main.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/roles/nodejs/tasks/main.yml b/roles/nodejs/tasks/main.yml index 5cc6379a..757dc39c 100644 --- a/roles/nodejs/tasks/main.yml +++ b/roles/nodejs/tasks/main.yml @@ -6,11 +6,17 @@ chdir: "{{ home_dir }}" executable: /bin/bash +- name: Read Node.js version + shell: "cat .node-version" + args: + chdir: "{{ release_dir }}" + register: node_version + - name: Install nodejs via fnm shell: cmd: | eval "$(fnm env)" - fnm use --install-if-missing + fnm install {{ node_version.stdout }} chdir: "{{ release_dir }}" executable: /bin/bash environment: