xci: playbooks: Fix conditional for scenario/flavor fact 55/49355/2
authorMarkos Chandras <mchandras@suse.de>
Wed, 20 Dec 2017 11:18:41 +0000 (11:18 +0000)
committerFatih Degirmenci <fdegir@gmail.com>
Wed, 20 Dec 2017 23:11:01 +0000 (00:11 +0100)
We need to use proper jinja2 code to set the fact properly.

Change-Id: I903233c0e059edf2af973ea9c08b8bd80795e1a9
Signed-off-by: Markos Chandras <mchandras@suse.de>
xci/playbooks/get-opnfv-scenario-requirements.yml

index 944bf53..037c6ea 100644 (file)
@@ -85,7 +85,7 @@
 
     - name: Determine if selected {{ DEPLOY_SCENARIO }} scenario can be deployed
       set_fact:
-        deploy_scenario_on_flavor: XCI_FLAVOR in item.flavors
+        deploy_scenario_on_flavor: "{{ (XCI_FLAVOR in item.flavors) | ternary(True, False) }}"
       when: DEPLOY_SCENARIO == item.scenario
       with_items: "{{ scenarios }}"
       loop_control: