From bfdb543c096aca9173fe3883a3ce7339ddf0ac3f Mon Sep 17 00:00:00 2001 From: lefos Date: Sun, 31 Oct 2021 23:32:03 +0200 Subject: [PATCH] node yml --- monitorall.yml.sh | 2 +- node.yml | 22 +++++++++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/monitorall.yml.sh b/monitorall.yml.sh index a666b26..c6dadf1 100644 --- a/monitorall.yml.sh +++ b/monitorall.yml.sh @@ -14,7 +14,7 @@ ip6=$(/sbin/ip -o -6 addr list eth0 | awk '{print $4}' | cut -d/ -f1) #workers ip echo "[service]" > /project/courses/Thesis/inventory.yml -/project/bin/swarmlab-nmap >> /project/courses/Thesis/inventory.yml +# /project/bin/swarmlab-nmap >> /project/courses/Thesis/inventory.yml # include master or not diff --git a/node.yml b/node.yml index 5b6fbd0..4bb9573 100644 --- a/node.yml +++ b/node.yml @@ -7,7 +7,27 @@ tasks: - name: Copy files to workers + become: true git: repo: https://git.swarmlab.io:3000/Lefteris/dummyservice.git dest: /project/courses/dummy - force: yes \ No newline at end of file + force: yes + - name: apt install packages + become: true + apt: + update_cache: 'yes' + force_apt_get: 'yes' + install_recommends: true + autoremove: true + name: "{{ packages }}" + vars: + packages: + - nodejs + - name: install dependencies + npm: + path: "/project/course/dummy/swarmlab-app/src" + state: present + - name: Build app + command: npm run start + args: + chdir: "/project/course/dummy/swarmlab-app/src" \ No newline at end of file