To create a deployment script for production, perform these steps:
- Make sure to have the deployment/ansible_templates directory with the Jinja templates for service configuration that we created in the previous Deploying on Apache with mod_wsgi for the staging environment recipe.
- Create the deployment/production and deployment/production/ansible directories for the Ansible scripts.
- There, create a hosts directory with a remote file containing the following content:
# deployment/production/ansible/hosts/remote[servers]myproject-apache[servers:vars]ansible_python_interpreter=/usr/bin/python3
- Create a vars.yml file there with the variables that will be used in the installation scripts and Jinja templates for configurations: ...