-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblag_deploy.yml
44 lines (35 loc) · 1.14 KB
/
blag_deploy.yml
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
- hosts: blag
remote_user: debian
tasks:
# clone blag from github
- git: repo=ssh://[email protected]/aztektum/blag.git accept_hostkey=yes
dest=/home/debian/apps/blag
key_file=/home/debian/.ssh/ansible_key
force=yes
# install python requirements with pip into venv
- pip: requirements=/home/debian/apps/blag/requirements.txt
virtualenv=/home/debian/apps/blag/venv
# setup a runit job to make this work
# - file: path=/etc/sv/blag state=directory
# #when: false
# become: yes
# become_method: sudo
- file: path=/service state=directory
become: yes
become_method: sudo
- file: src=/home/debian/apps/blag dest=/etc/sv/blag
owner=debian
group=debian
state=link
become: yes
become_method: sudo
- file: src=/etc/sv/blag dest=/etc/service/blag
owner=debian
group=debian
state=link
become: yes
become_method: sudo
- file: path=/home/debian/apps/blag/run
state=touch
mode="u=rx,g=r,o=r"
- command: runsv /etc/sv/blag