项目作者: infOpen

项目描述 :
Ansible role to deploy and configure uwsgi
高级语言: Python
项目地址: git://github.com/infOpen/ansible-role-uwsgi.git
创建时间: 2016-09-28T22:18:10Z
项目社区:https://github.com/infOpen/ansible-role-uwsgi

开源协议:MIT License

下载


uwsgi

Build Status
Build Status
Updates
Python 3
Ansible Role

Install uwsgi package.

Requirements

This role requires Ansible 2.2 or higher,
and platform requirements are listed in the metadata file.

Testing

This role use Molecule to run tests.

Local and Travis tests run tests on Docker by default.
See molecule documentation to use other backend.

Currently, tests are done on:

  • Debian Jessie
  • Ubuntu Trusty
  • Ubuntu Xenial

and use:

  • Ansible 2.2.x
  • Ansible 2.3.x
  • Ansible 2.4.x

Running tests

Using Docker driver

  1. $ tox

Role Variables

Default role variables

  1. # Installation vars
  2. uwsgi_install_mode: 'package'
  3. uwsgi_packages: "{{ _uwsgi_packages }}"
  4. uwsgi_service_name: 'uwsgi'
  5. # Configuration vars
  6. uwsgi_configuration_available_path: "{{ _uwsgi_configuration_available_path }}"
  7. uwsgi_configuration_enabled_path: "{{ _uwsgi_configuration_enabled_path }}"
  8. uwsgi_configuration_log_path: "{{ _uwsgi_configuration_log_path }}"
  9. uwsgi_configuration_run_path: "{{ _uwsgi_configuration_run_path }}"
  10. uwsgi_configuration_owner: 'root'
  11. uwsgi_configuration_group: 'root'
  12. uwsgi_configuration_mode: '0640'
  13. uwsgi_apps: []
  14. uwsgi_apps_defaults: "{{ _uwsgi_apps_defaults }}"
  15. # Handler management
  16. uwsgi_restart_handler_enabled: True

Debian family variables

  1. # Package management
  2. _uwsgi_packages:
  3. - name: 'uwsgi'
  4. - name: 'uwsgi-plugin-python'
  5. - name: 'uwsgi-plugin-python3'
  6. # Configuration management
  7. _uwsgi_configuration_available_path: '/etc/uwsgi/apps-available'
  8. _uwsgi_configuration_enabled_path: '/etc/uwsgi/apps-enabled'
  9. _uwsgi_configuration_log_path: '/var/log/uwsgi'
  10. _uwsgi_configuration_run_path: '/var/run/uwsgi'
  11. _uwsgi_apps_defaults:
  12. uwsgi:
  13. autoload: true
  14. master: true
  15. workers: 2
  16. no-orphans: true
  17. pidfile: "{{ uwsgi_configuration_run_path ~ '/%(deb-confnamespace)/%(deb-confname)/pid' }}"
  18. socket: "{{ uwsgi_configuration_run_path ~ '/%(deb-confnamespace)/%(deb-confname)/socket' }}"
  19. logto: "{{ uwsgi_configuration_log_path ~ '/%(deb-confnamespace)/%(debconfname).log' }}"
  20. chmod-socket: 660
  21. log-date: true
  22. uid: www-data
  23. gid: www-data

Dependencies

None

Example Playbook

  1. - hosts: servers
  2. roles:
  3. - { role: infOpen.uwsgi }

License

MIT

Author Information

Alexandre Chaussier (for Infopen company)