Skip to content

Latest commit

 

History

History
51 lines (37 loc) · 1.45 KB

README.md

File metadata and controls

51 lines (37 loc) · 1.45 KB

python-wsgi

Ansible role to install WSGI by compiling with a custom Python version.

Django case

In order to deploy a Python 3 Django 1.8+ project to the above setup, WSGI will not respect the python version specified in virtualenv unless WSGI is compiled with the same Python version.

Otherwise, looking into the error traceback will reveal that the Python running will be the default and not 3.4+. It is [possible to provide] to WSGI a different Python executable only if WSGI is [compiled with the correct Python].

Add the role python-wsgi to install WSGI.

Variables

  • wsgi_src: Directory where to download wsgi, default: ~/mod_wsgi_src
  • wsgi_ver: The wsgi version to install, default: 4.4.21
  • python_version: The python version to install (major.minor), default: 3.5

Useful links

Playbook examples

Plain:

---
- hosts: servers
  roles:
    - python-wsgi

Specify variables:

---
- hosts: servers
  gather_facts: no
  roles:
    - role: python-wsgi
      python_version: 3.4