I am provisioning a server with a Django Stack via Ansible and getting the app from bitbucket, I am using https://github.com/jcalazan/ansible-django-stack, but I have had to tweak it a bit in order to make it work with a private bitbucket repo.
Now it's authenticating correctly but giving me the following error
failed: [default] => {"failed": true} msg: youtubeadl: ERROR (not running) youtubeadl: ERROR (abnormal termination)
When performing this task:
- name: Restart Supervisor
supervisorctl: name={{ application_name }} state=restarted
Reading gunicorn ERROR (abnormal termination), I would like to add the project to the PYTHONPATH, any ideas how to approach this with an Ansible task, or am I missing something?
Thanks
PYTHONPATH
is just another environment variable, so you can use the best practices explained in the FAQ. If it's only needed for the one task, it'd look something like:
- name: Restart Supervisor
supervisorctl: name={{ application_name }} state=restarted
environment:
PYTHONPATH: "{{ ansible_env.PYTHONPATH }}:/my/path"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With