This is a project which aims to automate the setup of a Django project based on Django setup guide.
It uses a Ansible playbook to do this.
-
To install ansible , refer here.
-
Then edit or create a
/etc/ansible/hosts
file and add the IP address or hostname of server you want to deploy on. More instructions can be found here. Also follow commands to setup ssh-agent given here. -
As ansible authenticates using ssh , you need to add your public ssh key in
authorized_keys
on the machine you want to deploy to. -
You can test your server is reponding by running
ansible all -m ping
-
If the last command is a success then you can run the playbook on the machine using
ansible-playbook playbook.yml --ask-become-pass
after replacing{{host}}
in theplaybook.yml
file with the IP address or hostname.
This project is a work in progress.