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