Provisions a Django project, SFL style.
Running this roles results in the creation of a fully functional Django instance, isolated in a Python virtualenv. The operations provided by this role (requirements installation, migrations execution, ...) can be performed in non-privileged mode.
- Ansible 2.2+
- Something to serve the deployed django app. See below.
This role only takes care of deploying a django project's code and perform tasks generally associated with this deployment (migrations, etc.). It doesn't configure a HTTP server to expose that app.
Therefore, you need another role to provision this part. A good option would be ansible-django which configures nginx and uwsgi to serve a django app, which fits nicely with this role, because that's exactly what we provide!
You call this role as with any other roles. See vars file for customisation options.
Here's an example usage for a local development environment:
---
- name: Install a fully functional Django
hosts: django-dev
roles:
- role: django-deploy
django_user: vagrant