You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
792 B
33 lines
792 B
---
|
|
- hosts: service
|
|
remote_user: docker
|
|
gather_facts: no
|
|
vars:
|
|
user: "docker"
|
|
|
|
tasks:
|
|
- name: Copy files to workers
|
|
become: true
|
|
git:
|
|
repo: https://git.swarmlab.io:3000/Lefteris/dummyservice.git
|
|
dest: /project/courses/dummy
|
|
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"
|