Skip to content

Simple and beautiful django ansible template for install project in local environments and servers

License

Notifications You must be signed in to change notification settings

ma1onso/django_ansible_template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django-ansible-template

Simple and beautiful django ansible template for install project in local environments and servers

How to use:

django-admin.py startproject --template=https://github.com/malonso11/django_ansible_template/archive/master.zip PROJECT_NAME

Note: Encrypt all sensible data with ansible-vault encrypt_string STRING and put this in all files. Example

Local installation

  • Install ansible
  • Set ansible/stages/local/group_vars/all and ansible/local/hosts values.
  • run sh scripts/install.sh

Prepare remote server

  • Install ansible
  • Set your ansible/stages/STAGE[test|staging|production]/group_vars/all and ansible/STAGE[test|staging|production]/hosts values.
  • run sh scripts/prepare_server.sh

Deploy remote server

  • Install ansible
  • Set your ansible/stages/STAGE[test|staging|production]/group_vars/all and ansible/STAGE[test|staging|production]/hosts values.
  • run sh scripts/deploy_STAGE[test|staging|production].sh

TODOs:

  • Automatically set env variables (needed in settings/*) with ansible and add steps for encrypt this data.
  • Test prepare remote server step
  • Test deploy remote server step
  • Skip --ask-vault-pass for automatic deployment.
  • Only use one playbook for deploy remote servers
  • Replace env.j2 with another ansible feature

About

Simple and beautiful django ansible template for install project in local environments and servers

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published