aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRex Lee <limingjiang@huawei.com>2018-09-13 08:26:52 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-09-13 08:26:52 +0000
commit65114e3ca01207d4235f27573289ed4c99d14c1e (patch)
tree2a574dc2b32fc6479f698df1e170cb1357b5af69
parent8dcd0b89eee6e4bbc69ae0d6f4673a0fdd8ee4bf (diff)
parent4a12ac423399b91d272f2c97ab65bbcff1581758 (diff)
Merge "Update configure_uwsgi run in baremetal/container"
-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> #}