-
Notifications
You must be signed in to change notification settings - Fork 2
/
repo.yml
65 lines (55 loc) · 1.8 KB
/
repo.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
- name: Downloading the project
sudo: true
sudo_user: "{{ prname }}"
git: repo={{ repo }} dest=/home/{{prname}}/{{ prname }} accept_hostkey=True
- name: Creating the virtualenv
sudo: true
sudo_user: "{{ prname }}"
shell: virtualenv env
args:
chdir: /home/{{prname}}
- name: Installing python packages
sudo: true
sudo_user: "{{ prname }}"
pip: virtualenv=/home/{{prname}}/env requirements=/home/{{prname}}/{{prname}}/requirements.txt
- name: Installing psycopg2 packages
sudo: true
sudo_user: "{{ prname }}"
pip: virtualenv=/home/{{prname}}/env name="psycopg2"
- name: Installing uwsgi packages
sudo: true
sudo_user: "{{ prname }}"
pip: virtualenv=/home/{{prname}}/env name="uwsgi"
- name: Creates webstatic directory
sudo: true
sudo_user: "{{ prname }}"
file: path=/home/{{prname}}/webstatic state=directory
- name: Creating deploy settings
sudo: true
template: src=templates/deploy.py dest=/home/{{prname}}/{{prname}}/{{prname}}/{{prname}} owner="{{prname}}" mode=0644
- name: Collect static
sudo: true
sudo_user: "{{ prname }}"
django_manage: command=collectstatic
args:
app_path: /home/{{prname}}/{{prname}}/{{prname}}
virtualenv: /home/{{prname}}/env
settings: "{{prname}}.deploy"
- name: Syncdb
sudo: true
sudo_user: "{{ prname }}"
django_manage: command=syncdb
args:
app_path: /home/{{prname}}/{{prname}}/{{prname}}
virtualenv: /home/{{prname}}/env
settings: "{{prname}}.deploy"
- name: Migrate
sudo: true
sudo_user: "{{ prname }}"
shell: /home/{{prname}}/env/bin/python manage.py migrate --no-initial-data --settings={{prname}}.deploy
args:
chdir: /home/{{prname}}/{{prname}}/{{prname}}
- name: Creating uwsgi settings
sudo: true
template: src=templates/uwsgi.ini dest=/home/{{prname}}/uwsgi.ini owner="{{prname}}" mode=0644