-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdoit.yaml
48 lines (42 loc) · 1.11 KB
/
doit.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
44
45
46
47
48
---
- name: Install postars
hosts:
- roach
gather_facts: no
vars:
tasks:
- name: install packages
ansible.builtin.apt:
name:
- chromium
- python3
- python3-pip
- python3-virtualenv
state: present
- name: Create goat directory
ansible.builtin.file:
path: "/var/goat"
state: directory
- name: copy app stuff
ansible.builtin.copy:
src: app/
dest: "/var/goat/postars/app"
- name: copy requirements
ansible.builtin.copy:
src: requirements.txt
dest: "/var/goat/postars/requirements.txt"
- name: make venv and install packages
ansible.builtin.pip:
chdir: "/var/goat/postars"
requirements: "./requirements.txt"
virtualenv: "/var/goat/postars/venv"
- name: Create the service
ansible.builtin.copy:
src: "postars.service"
dest: "/etc/systemd/system/postars.service"
- name: Start systemd service
ansible.builtin.systemd:
name: postars
state: restarted
daemon_reload: yes
enabled: yes