Skip to content

Ansible role to prepare the launch of a Django app on a Plesk managed Ubuntu server.

License

Notifications You must be signed in to change notification settings

Wtower/ansible-django-prepare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django-prepare

Ansible role to prepare the launch of a Django app on a Plesk managed Ubuntu server:

  • installs important packages
  • imports timezone data to MySQL (optional)
  • setup virtualenv (optional)

Packages

Timezone data (optional)

If the tzinfo data is missing from mysql, a ValueError occurs (see official mysql docs, relevant tzinfo blog, how to check tzinfo, how to set tzinfo).

Setup virtualenv (optional)

Create a directory to keep all virtualenvs and prepare bash profile for the user.

How to use

To use, add the role django-prepare.

Variables

  • ansible_user_id: The user id with access to mysql and mysql database.
  • mysql_pass: MySQL password (better obtain from vault or prompt in playbook). Omit to skip mysql import of data.
  • virtualenv_dir: Virtualenvs home directory. Set to false to disable virtualenv. Default: /var/virtualenvs.
  • plesk_server_group: Plesk server group, default: psaserv.

Playbook examples

Plain:

---
- hosts: servers
  roles:
    - django-prepare

Specify variables:

---
- hosts: servers
  gather_facts: no
  roles:
    - role: django-prepare
      virtualenv_dir: ~/.virtualenvs

Galaxy

See more roles regarding Django on https://galaxy.ansible.com/Wtower/

About

Ansible role to prepare the launch of a Django app on a Plesk managed Ubuntu server.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published