gunicorn – Run gunicorn with various settings¶
New in version 2.4.
Starts gunicorn with the parameters specified. Common settings for gunicorn configuration are supported. For additional configuration use a config file See https://gunicorn-docs.readthedocs.io/en/latest/settings.html for more options. It’s recommended to always use the chdir option to avoid problems with the location of the app.
If not specified on config file, a temporary error log will be created on /tmp dir. Please make sure you have write access in /tmp dir. Not needed but will help you to identify any problem with configuration.
- name: simple gunicorn run example gunicorn: app: 'wsgi' chdir: '/workspace/example' - name: run gunicorn on a virtualenv gunicorn: app: 'wsgi' chdir: '/workspace/example' venv: '/workspace/example/venv' - name: run gunicorn with a config file gunicorn: app: 'wsgi' chdir: '/workspace/example' conf: '/workspace/example/gunicorn.cfg' - name: run gunicorn as ansible user with specified pid and config file gunicorn: app: 'wsgi' chdir: '/workspace/example' conf: '/workspace/example/gunicorn.cfg' venv: '/workspace/example/venv' pid: '/workspace/example/gunicorn.pid' user: 'ansible'
Common return values are documented here, the following are the fields unique to this module:
process id of gunicorn