diff options
Diffstat (limited to 'xci/playbooks')
-rw-r--r-- | xci/playbooks/get-opnfv-scenario-requirements.yml | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/xci/playbooks/get-opnfv-scenario-requirements.yml b/xci/playbooks/get-opnfv-scenario-requirements.yml index b44c50b4..f515c253 100644 --- a/xci/playbooks/get-opnfv-scenario-requirements.yml +++ b/xci/playbooks/get-opnfv-scenario-requirements.yml @@ -95,25 +95,47 @@ loop_control: label: "{{ item.item.scenario }}" - - name: Determine if selected {{ DEPLOY_SCENARIO }} scenario can be deployed + - name: Gather information about the selected {{ DEPLOY_SCENARIO }} scenario set_fact: - deploy_scenario_on_flavor: "{{ (XCI_FLAVOR in item.flavors) | ternary(True, False) }}" - when: DEPLOY_SCENARIO == item.scenario + deploy_scenario: "{{ item }}" with_items: "{{ scenarios }}" loop_control: label: "{{ item.scenario }}" + when: DEPLOY_SCENARIO | lower == item.scenario - - name: Fail if {{ XCI_FLAVOR }} is not supported in {{ DEPLOY_SCENARIO }} + - name: Determine if the selected {{ DEPLOY_SCENARIO }} scenario can be deployed + block: + - set_fact: + deploy_scenario_nfvi: "{{ item }}" + with_items: "{{ deploy_scenario.nfvis }}" + loop_control: + label: "{{ item.nfvi }}" + when: item.nfvi == XCI_NFVI + - set_fact: + deploy_scenario_flavor: "{{ (XCI_FLAVOR in deploy_scenario_nfvi.flavors) | bool }}" + when: + - deploy_scenario_nfvi + - set_fact: + deploy_scenario_distro: "{{ (XCI_DISTRO in deploy_scenario_nfvi.distros) | bool }}" + when: + - deploy_scenario_nfvi + - deploy_scenario_flavor + when: deploy_scenario is defined + + - name: Fail if {{ DEPLOY_SCENARIO }} is not supported fail: msg: - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - - ERROR! The {{ DEPLOY_SCENARIO }} scenario does not support the {{ XCI_FLAVOR }} + - ERROR! The {{ DEPLOY_SCENARIO }} scenario can't be deployed. This is because + - the {{ XCI_NFVI }} NFVI or the {{ XCI_FLAVOR }} flavor or the {{ XCI_DISTRO }} + - distribution is not supported by this scenario. It may also be possible that + - this scenario doesn't exist at all or it's not listed in {{ scenario_file }}. - '' - This is a great chance for you to contribute to XCI ;-) - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - '' when: - - not deploy_scenario_on_flavor + - deploy_scenario is not defined or not deploy_scenario_distro vars: ansible_python_interpreter: "/usr/bin/python" |