Merge "Allow extra arguments to be passed to the uwsgi application through pyargv"

This commit is contained in:
Zuul 2023-02-11 11:46:00 +00:00 committed by Gerrit Code Review
commit e157a116e9
2 changed files with 2 additions and 1 deletions

View File

@ -54,6 +54,7 @@ uwsgi_env: "{{ _uwsgi_env }}"
# uwsgi_tls:
# crt: /path/to/crt
# key: /path/to/key
# uwsgi_pyargv: "--foo=bar --config_file=/etc/foo/foo.conf"
uwsgi_services: {}
# Override can be used to apply config change to all uwsgi services

View File

@ -46,7 +46,7 @@
- service_name: "{{ service_var.value.service_name | default(service_var.key) }}"
enabled: yes
state: started
execstarts: "{{ uwsgi_bin }}/uwsgi --autoload --ini /etc/uwsgi/{{ service_var.key }}.ini"
execstarts: "{{ uwsgi_bin }}/uwsgi --autoload --ini /etc/uwsgi/{{ service_var.key }}.ini {{ (service_var.value.uwsgi_pyargv is defined) | ternary('--pyargv \"' ~ service_var.value.uwsgi_pyargv | default('') ~ '\"', '') }}"
execreloads: "{{ uwsgi_bin }}/uwsgi --reload {{ uwsgi_run_dir }}/{{ service_var.key }}/{{ uwsgi_system_slice_name }}/{{ service_var.key }}.pid"
config_overrides: "{{ service_var.value.init_config_overrides | default({}) | combine(uwsgi_init_config_overrides, recursive=True) }}"
with_dict: "{{ uwsgi_services }}"