-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.yaml
43 lines (36 loc) · 904 Bytes
/
deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
- hosts: o1
vars:
project_dir: startpage
tasks:
- name: Project directory
file:
path: "{{ project_dir }}"
state: directory
- name: Data directory
file:
path: "{{ project_dir + '/data' }}"
state: directory
- name: Copy | index.html
copy:
src: index.html
dest: "{{ project_dir + '/data' }}"
- name: Copy | main.css
copy:
src: main.css
dest: "{{ project_dir + '/data' }}"
- name: Copy | docker-compose file
copy:
src: docker-compose.yaml
dest: "{{ project_dir }}"
- name: Copy | service file
copy:
src: startpage.service
dest: /etc/systemd/system
become: true
- name: Start the service
systemd:
enabled: true
state: restarted
daemon_reload: yes
name: startpage
become: true