forked from savoirfairelinux/ansible-django
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.yml
95 lines (75 loc) · 3.85 KB
/
main.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# If set, running the role will remove all files that it normally creates. It doesn't uninstall
# packages, however.
django_uninstall: no
# Name used as a default value in most variables below
django_name: django
# Whether the project is in python 3
django_ispython3: yes
# Root path of the django project
django_path: "/opt/{{ django_name }}"
# Domain name under which the project is served. Ends up in ALLOWED_HOSTS and as PROJECT_DOMAIN
# in local_settings. It also, of course, ends up in nginx conf as server_name.
django_domain_name: "{{ django_name }}.vagrant.dev"
# Extra domain names to support in this project. Ends up in ALLOWED_HOSTS. It's also added to nginx
# conf's server_name.
django_extra_domain_names: []
# Path of the virtualenv where we install python dependencies
django_env: "{{ django_path }}/env"
# Path where the source of the project is placed.
django_project_path: "{{ django_path }}/project"
# Path, inside the project's source, where "manage.py" lives.
django_src_path: "{{ django_project_path }}/src"
# python executable name. re-used in other variables below
django_python2exec: python2.7
django_python3exec: python3.4
django_pythonexec: "{{ django_ispython3 | ternary(django_python3exec, django_python2exec) }}"
# Path for the site-packages folder inside the virtualenv (you normally don't have to change this
# unless it's the wrong path). This is where we go place the "local_settings.py" file.
django_sitepackages_path: "{{ django_env }}/lib/{{ django_pythonexec }}/site-packages"
# Path for STATIC_ROOT
django_static_path: "{{ django_path }}/static"
# Path for MEDIA_ROOT
django_media_path: "{{ django_path }}/media"
# Path to a requirements file. This is what will be installed inside our virtualenv.
django_requirements_file: "{{ django_project_path }}/requirements.txt"
# URL to git repo of the project. if django_project_symlink_dest isn't set, this repo will be
# cloned in django_project_path.
django_project_repo_url: ""
django_project_repo_version: master
# If set, we place a symlink at django_project_path pointing to this path. Usually used in
# Vagrant environment, allowing us to do live reloads upon file edits.
django_project_symlink_dest: ""
# Owner of django_path. Most commands in this role are ran under this user.
# Will be created if it doesn't exist.
django_user: "{{ django_name }}"
# Type of database to install. Choices: postgres, mariadb
django_dbtype: postgres
# User to use for db connection.
django_dbuser: "{{ django_user }}"
# DB name to use.
django_dbname: "{{ django_name }}"
# password to use for db connection.
django_dbpass: whatever
# Value of the ENGINE param in Django settings' DATABASES dictionary.
django_dbengine_name: "django.db.backends.{{ (django_dbtype == 'postgres') | ternary('postgresql_psycopg2', 'mysql') }}"
# Whether we run django in debug mode.
django_debug: no
# Ends up in SECRET_KEY setting.
django_secret_key: whatever
# Arbitrary python code to add to local_settings.py. Will be appended as-is to the end of the file.
django_env_settings_extra: ''
# Ends up in "processes" uwsgi config
django_uwsgi_process_count: 5
# Fixtures to load in django after deployment. list of paths relative to manage.py
django_fixtures_to_load: []
# If set, we will try, before installing Django, to provide initial data for it, that is, a DB
# and media files. We will do so through django_initial_data_restore_script.
django_provide_initial_data: no
# Path of the script to call to restore our DB and media files. It's expected to import SQL dumps
# from backup into our django_dbname and to restore media files into django_media_path.
django_initial_data_restore_script: "{{ django_path }}/restore.sh"
# If set, we will disallow robots by including the "disallow_robots" snippet provided by the
# nginx role.
django_disallow_robots: no
# If set, our nginx config will only answer to HTTPS requests, ignoring requests on port 80.
django_ssl_only: no