Giter Site home page Giter Site logo

ansible-uwsgi's Introduction

uwsgi

Ansible role which helps to install and configure uWSGI.

The configuration of the role is done in such way that it should not be necessary to change the role for any kind of configuration. All can be done either by changing role parameters or by declaring completely new configuration as a variable. That makes this role absolutely universal. See the examples below for more details.

Please report any issues or send PR.

Examples

- name: Default uWSGI installation
  hosts: all
  roles:
    - uwsgi

- name: Customized installation
  hosts: all
  vars:
    # Install Python plugin
    uwsgi_plugins:
      - python
    # Add application configuration
    uwsgi_config_uwsgi__custom:
      plugin: python
      socket: :8081
      chdir: /opt/RatticWeb-1.3.1
      wsgi-file: ratticweb/wsgi.py
  roles:
    - uwsgi

Role variables

# Whether to install EPEL YUM repo
uwsgi_epel_install: "{{ yumrepo_epel_install | default(true) }}"

# EPEL YUM repo URL
uwsgi_epel_yumrepo_url: "{{ yumrepo_epel_url | default('https://dl.fedoraproject.org/pub/epel/$releasever/$basearch/') }}"

# EPEL YUM repo GPG key
uwsgi_epel_yumrepo_gpgkey: "{{ yumrepo_epel_gpgkey | default('https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-$releasever') }}"

# Additional EPEL YUM repo params
uwsgi_epel_yumrepo_params: "{{ yumrepo_epel_params | default({}) }}"

# Package to be installed (explicit version can be specified here)
uwsgi_pkg: uwsgi

# List of plugins to install
uwsgi_plugins: []

# Name of the service
uwsgi_service: uwsgi


# Path to the main config file
uwsgi_config_path: /etc/uwsgi.ini

# Values of the default options of the uwsgi section of the main config
uwsgi_config_uwsgi_uid: uwsgi
uwsgi_config_uwsgi_gid: uwsgi
uwsgi_config_uwsgi_pidfile: /run/uwsgi/uwsgi.pid
uwsgi_config_uwsgi_emperor: /etc/uwsgi.d
uwsgi_config_uwsgi_stats: /run/uwsgi/stats.sock
uwsgi_config_uwsgi_chmod_socket: 660
uwsgi_config_uwsgi_emperor_tyrant: "true"
uwsgi_config_uwsgi_cap: setgid,setuid

# Default options of the uwsgi section of the main config
uwsgi_config_uwsgi__default:
  uid: "{{ uwsgi_config_uwsgi_uid }}"
  gid: "{{ uwsgi_config_uwsgi_gid }}"
  pidfile: "{{ uwsgi_config_uwsgi_pidfile }}"
  emperor: "{{ uwsgi_config_uwsgi_emperor }}"
  stats: "{{ uwsgi_config_uwsgi_stats }}"
  chmod-socket: "{{ uwsgi_config_uwsgi_chmod_socket }}"
  emperor-tyrant: "{{ uwsgi_config_uwsgi_emperor_tyrant }}"
  cap: "{{ uwsgi_config_uwsgi_cap }}"

# Custom options of the uwsgi section of the main config
uwsgi_config_uwsgi__custom: {}

# Final uwsgi section of the main config
uwsgi_config_uwsgi: "{{
  uwsgi_config_uwsgi__default.update(uwsgi_config_uwsgi__custom) }}{{
  uwsgi_config_uwsgi__default }}"

# Default main config
uwsgi_config__default:
  uwsgi: "{{ uwsgi_config_uwsgi }}"

# Custom main config
uwsgi_config__custom: {}

# Final main config
uwsgi_config: "{{
  uwsgi_config__default.update(uwsgi_config__custom) }}{{
  uwsgi_config__default }}"

Dependencies

License

MIT

Authors

Dennis Tait, Jiri Tyr

ansible-uwsgi's People

Watchers

 avatar

Forkers

jtyr

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.