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

Related-Bug: 1987405
Change-Id: I89f7b27838647e4993cc2656d0fded9902e5f7c6
This commit is contained in:
Jonathan Rosser 2023-01-30 17:29:24 +00:00
parent c354def47a
commit 19bb89faaa
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 }}"