Go to file
2023-03-09 18:02:25 +03:00
roles Initial 2023-03-09 18:02:25 +03:00
.gitignore Initial 2023-03-09 18:02:25 +03:00
hosts Initial 2023-03-09 18:02:25 +03:00
Readme.md Initial 2023-03-09 18:02:25 +03:00
requirements.txt Initial 2023-03-09 18:02:25 +03:00
setup.yaml Initial 2023-03-09 18:02:25 +03:00

Ansible playbook to deploy stack for Django

Virtualenv

Setup virtualenv locally

python3.11 -m venv ./venv
source ./venv/bin/activate
pip install --upgrade pip

After that setup ansible and all requirements

pip install -r ./requirements.txt

Configure remote servers list

Edit invetory file hosts. Replace domain and IP address at least.

Configure playbook

Edit variables in setup.yaml to install and configure needed software

Run

ansible-playbook -i hosts ./setup.yaml

If you don't have authorization via ssh keys you may add -k option to ask ssh password. If you don't have passwordless sudo access you may add -K option to ask sudo password.

So, the command will be like

ansible-playbook -i hosts ./setup.yaml -kK