Update configure_uwsgi run in baremetal/container 59/61259/2
authorStepan Andrushko <stepanx.andrushko@intel.com>
Wed, 22 Aug 2018 16:01:28 +0000 (19:01 +0300)
committerStepan Andrushko <stepanx.andrushko@intel.com>
Tue, 11 Sep 2018 12:30:17 +0000 (12:30 +0000)
Now "daemonize" prevents from installing Yardstick on baremetal.
Configuring:
"daemonize" in case "container" installation mode;
"logto" in case "baremetal" installation mode;

JIRA: YARDSTICK-1395

Change-Id: Ie390464db9c0816583edc711ed6526629d091bd3
Signed-off-by: Stepan Andrushko <stepanx.andrushko@intel.com>
ansible/roles/configure_uwsgi/tasks/main.yml
ansible/roles/configure_uwsgi/templates/yardstick.ini.j2

index 6a22446..8822bda 100644 (file)
     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
index 495febb..1890f16 100644 (file)
@@ -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> #}