From 46bfcadb0b239d3dab866fe38f9ba15eda1ed17e Mon Sep 17 00:00:00 2001 From: lefos Date: Sun, 31 Oct 2021 23:51:29 +0200 Subject: [PATCH] node yml --- node.yml | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/node.yml b/node.yml index f74cb51..f4c05cb 100644 --- a/node.yml +++ b/node.yml @@ -12,26 +12,28 @@ repo: https://git.swarmlab.io:3000/Lefteris/dummyservice.git dest: /project/courses/dummy force: yes - - name: apt update packages - become: true - apt: - update_cache: 'yes' - force_apt_get: 'yes' - upgrade: 'dist' - cache_valid_time: 3600 - install_recommends: true - autoremove: true - - name: apt install packages - become: true + # - name: apt update packages + # become: true + # apt: + # update_cache: 'yes' + # force_apt_get: 'yes' + # upgrade: 'dist' + # cache_valid_time: 3600 + # install_recommends: true + # autoremove: true + - name: Install the gpg key for nodejs LTS + apt_key: + url: "https://deb.nodesource.com/gpgkey/nodesource.gpg.key" + state: present + - name: Install the nodejs LTS repos + apt_repository: + repo: "deb https://deb.nodesource.com/node_{{ NODEJS_VERSION }}.x {{ ansible_distribution_release }} main" + state: present + update_cache: yes + - name: Install the nodejs apt: - update_cache: 'yes' - force_apt_get: 'yes' - install_recommends: true - autoremove: true - name: "{{ packages }}" - vars: - packages: - - nodejs + name: nodejs + state: present - name: install dependencies npm: path: "/project/course/dummy/swarmlab-app/src"