aboutsummaryrefslogtreecommitdiffstats
path: root/ansible/roles/configure_uwsgi
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/configure_uwsgi')
-rw-r--r--ansible/roles/configure_uwsgi/tasks/main.yml8
-rw-r--r--ansible/roles/configure_uwsgi/templates/yardstick.ini.j22
2 files changed, 9 insertions, 1 deletions
diff --git a/ansible/roles/configure_uwsgi/tasks/main.yml b/ansible/roles/configure_uwsgi/tasks/main.yml
index 6a2244657..8822bda53 100644
--- a/ansible/roles/configure_uwsgi/tasks/main.yml
+++ b/ansible/roles/configure_uwsgi/tasks/main.yml
@@ -39,6 +39,14 @@
owner: root
mode: 0644
+- set_fact:
+ uwsgi_log: "logto"
+ when: installation_mode == inst_mode_container
+
+- set_fact:
+ uwsgi_log: "daemonize"
+ when: installation_mode != inst_mode_container
+
- name: Create the UWSGI config file
template:
src: yardstick.ini.j2
diff --git a/ansible/roles/configure_uwsgi/templates/yardstick.ini.j2 b/ansible/roles/configure_uwsgi/templates/yardstick.ini.j2
index 495febb19..1890f16f9 100644
--- a/ansible/roles/configure_uwsgi/templates/yardstick.ini.j2
+++ b/ansible/roles/configure_uwsgi/templates/yardstick.ini.j2
@@ -12,7 +12,7 @@ chmod-socket = 666
callable = app_wrapper
enable-threads = true
close-on-exec = 1
-logto = {{ log_dir }}/uwsgi.log
+{{ uwsgi_log }} = {{ log_dir }}/uwsgi.log
socket = {{ socket_file }}
{# If virtual environment, we need to add:
virtualenv = <virtual_env> #}