File tree 2 files changed +37
-6
lines changed 2 files changed +37
-6
lines changed Original file line number Diff line number Diff line change
1
+ enter the VM with:
2
+ $ vagrant ssh
3
+
4
+ the following commands have to be executed inside the VM!
5
+
6
+ 1) after provisioning the VM you have to set the 'admin' superuser password manually
7
+ $ ./manage.py changepassword admin
8
+
9
+ 2) start the server bound on all interfaces instead of 127.0.0.1 only
10
+ $ ./manage.py runserver 0.0.0.0:8000
Original file line number Diff line number Diff line change 2
2
- hosts : all
3
3
sudo : yes
4
4
tasks :
5
+ - name : link /mos -> /vagrant
6
+ file : src=/vagrant
7
+ dest=/mos
8
+ state=link
9
+
10
+ # check the existence of the secret_key.py file
11
+ - stat : path=/mos/mos/settings/secret_key.py
12
+ register : st
13
+ - fail : msg="Error! secret_key.py file not found in mos/settings folder (create one with content SECRET_KEY='start123')"
14
+ when : st.stat.exists == False
15
+
16
+ # update / install packages
5
17
- apt : update_cache=yes
18
+
6
19
# - apt: pkg=python-dev
7
20
- apt : pkg=build-essential
8
21
# - apt: pkg=python-pip
9
22
23
+ # install required python modules
10
24
- pip : requirements=/vagrant/requirements.txt
11
25
- pip : requirements=/vagrant/requirements-dev.txt
12
26
13
- - name : link /mos -> /vagrant
14
- file : src=/vagrant
15
- dest=/mos
16
- state=link
17
-
18
27
# - name: add locale de_DE
19
28
# lineinfile: dest=/etc/locale.gen
20
29
# regexp='^#\s*(de_DE.UTF-8\s*UTF-8)'
26
35
27
36
# sudo DEBIAN_FRONTEND=noninteractive dpkg-reconfigure locales
28
37
29
- - name : syncdb
38
+
39
+ # prepare MOS itself
40
+ - name : django syncdb
30
41
django_manage : app_path=/mos
31
42
command=syncdb
32
43
44
+ - name : django migrate
45
+ django_manage : app_path=/mos
46
+ command=migrate
47
+
48
+ - name : django loaddata
49
+ django_manage : app_path=/mos
50
+ fixtures='core/fixtures/default_choices.json members/fixtures/default_choices.json members/fixtures/dummy_members.json cal/fixtures/events_2012-09-20.json'
51
+ command=loaddata
52
+
53
+ # set the default directory to /mos
33
54
- lineinfile : dest=/home/vagrant/.bashrc
34
55
line='cd /mos'
You can’t perform that action at this time.
0 commit comments