From f785dceb9116d8dd36df1c4ea88bfe4c19951753 Mon Sep 17 00:00:00 2001 From: Luigi Toscano Date: Thu, 28 Apr 2016 20:04:51 +0200 Subject: [PATCH] Rework the validator script, always include all the code Include all the code for validation, but guard it with run-time variables that are properly initialized from the existing ansible variables. Switch prepare_tempest to false by default, the preparation code is generated anyway now. Change-Id: If2a7fcf864d380f2cb8af17881272ed3314834a7 --- .../roles/tripleo/overcloud/defaults/main.yml | 2 +- .../templates/overcloud-validate.sh.j2 | 22 ++++++++++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/playbooks/roles/tripleo/overcloud/defaults/main.yml b/playbooks/roles/tripleo/overcloud/defaults/main.yml index 7189cd498..d1d355926 100644 --- a/playbooks/roles/tripleo/overcloud/defaults/main.yml +++ b/playbooks/roles/tripleo/overcloud/defaults/main.yml @@ -43,6 +43,6 @@ deploy_args: >- step_deploy_overcloud: true step_validate_overcloud: true -prepare_tempest: true +prepare_tempest: false test_tempest: false test_ping: true diff --git a/playbooks/roles/tripleo/overcloud/templates/overcloud-validate.sh.j2 b/playbooks/roles/tripleo/overcloud/templates/overcloud-validate.sh.j2 index 5c3856449..b907c5d86 100644 --- a/playbooks/roles/tripleo/overcloud/templates/overcloud-validate.sh.j2 +++ b/playbooks/roles/tripleo/overcloud/templates/overcloud-validate.sh.j2 @@ -3,14 +3,24 @@ set -eux -{% if test_ping|bool %} +TEST_PING={% if test_ping|bool %}1{% else %}0{% endif %} + +PREPARE_TEMPEST={% if prepare_tempest|bool %}1{% else %}0{% endif %} + +TEST_TEMPEST={% if test_tempest|bool %}1{% else %}0{% endif %} + + +if [ ${TEST_PING} == "1" ]; then {% include 'tripleo-pingtest.sh.j2' %} -{% endif %} -{% if prepare_tempest|bool %} +fi + +if [ ${PREPARE_TEMPEST} == "1" ]; then {% include 'configure-tempest.sh.j2' %} -{% endif %} -{% if test_tempest|bool %} +fi + +if [ ${TEST_TEMPEST} == "1" ]; then {% include 'run-tempest.sh.j2' %} -{% endif %} + +fi