Browse Source

node yml

master
lefos 3 years ago
parent
commit
bfdb543c09
  1. 2
      monitorall.yml.sh
  2. 20
      node.yml

2
monitorall.yml.sh

@ -14,7 +14,7 @@ ip6=$(/sbin/ip -o -6 addr list eth0 | awk '{print $4}' | cut -d/ -f1)
#workers ip #workers ip
echo "[service]" > /project/courses/Thesis/inventory.yml 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 # include master or not

20
node.yml

@ -7,7 +7,27 @@
tasks: tasks:
- name: Copy files to workers - name: Copy files to workers
become: true
git: git:
repo: https://git.swarmlab.io:3000/Lefteris/dummyservice.git repo: https://git.swarmlab.io:3000/Lefteris/dummyservice.git
dest: /project/courses/dummy dest: /project/courses/dummy
force: yes 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"
Loading…
Cancel
Save