Handle condition when log setting not customized 69/75669/6
authorTaseer <taseer94@gmail.com>
Mon, 3 Sep 2018 08:38:29 +0000 (13:38 +0500)
committerTaseer <taseer94@gmail.com>
Thu, 13 Sep 2018 08:59:13 +0000 (10:59 +0200)
Initially, no log levels are defined in the var file. Customization
left to users. This patch adds the condition to run the customization
task only when those variables have been defined, else installation
will fail.

Change-Id: I9acff6e7cd86100525b327819a148f0471ce5716
Signed-off-by: Taseer <taseer94@gmail.com>
tasks/configure_odl_logs.yml

index 3d651d869401e38b55b183b0a566bd76f34d4b90..d3a007b0d44deb21dbbcd7fe7f1ba5811842d250 100644 (file)
@@ -6,6 +6,7 @@
     regexp: "^log4j2.{{ item.value.log_name }}.level.*s"
     line: "log4j2.{{ item.value.log_name }}.level = {{ item.value.log_level }}"
   with_dict: "{{ log_levels }}"
+  when: "item.value.log_name != None"
 
 - name: configure console logging
   block: