Skip to content

Commit 55fece2

Browse files
feat: add uwsgi support
1 parent 2df2160 commit 55fece2

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ FEATURES:
77
- Add validation tasks to check the Ansible version, the Jinja2 version, and whether the required Ansible collections for this role are installed.
88
- Bump the Ansible `community.general` collection to `9.2.0`, `community.crypto` collection to `2.21.1` and `community.docker` collection to `3.11.0`.
99
- Add templating support for the `ngx_mgmt_module`, `ngx_http_gzip_static_module`, and `ngx_stream_map_module` NGINX modules.
10+
- Now support uwsgi using the uwsgi_pass directive
1011

1112
BUG FIXES:
1213

defaults/main/template.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,8 @@ nginx_config_http_template:
293293
underscores_in_headers: false # Boolean -- Not available in the 'location' context
294294
variables_hash_bucket_size: 64 # Available only in the 'http' context
295295
variables_hash_max_size: 1024 # Available only in the 'http' context
296+
uwsgi:
297+
pass: upstreamserver
296298
http2: # Configure HTTP2
297299
enable: false # Boolean -- Not available in the 'location' context
298300
body_preread_size: 64k # Not available in the 'location' context

templates/http/default.conf.j2

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,12 @@ server {
309309
{{ core(location['core']) }}
310310
{%- endfilter %}
311311
{% endif %}
312+
{% if location['uwsgi'] is defined %}
313+
{% from 'http/uwsgi.j2' import uwsgi with context %}
314+
{% filter indent(8) %}
315+
{{ uwsgi(location['uwsgi']) }}
316+
{%- endfilter %}
317+
{% endif %}
312318
{% if location['http2'] is defined %}
313319
{% from 'http/modules.j2' import http2 with context %}
314320
{% filter indent(8) %}

templates/http/uwsgi.j2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{{ ansible_managed | comment }}
2+
3+
{% if uwsgi['pass'] is defined %}
4+
uwsgi_pass {{ uwsgi['pass'] }}
5+
{% endif %}

0 commit comments

Comments
 (0)