From 7bd3bbbd0691020538694c3bc5e5b97c16d19b10 Mon Sep 17 00:00:00 2001 From: James Slagle Date: Fri, 23 Aug 2019 18:02:33 -0400 Subject: [PATCH] Ensure container_startup_configs_json_stat is defined When using --tags to run only a subset of tasks from common/deploy-steps-tasks.yaml, the condition that checks the result of container_startup_configs_json_stat.stat.exists was failing since the task that defined it was skipped. This patch adds an additional "is defined" check to ensure the var is defined be the result is checked. Change-Id: Iadde90ed9416902848df2e60551470c0f1689a32 --- common/deploy-steps.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/deploy-steps.j2 b/common/deploy-steps.j2 index 6a4ddcf857..7b69152658 100644 --- a/common/deploy-steps.j2 +++ b/common/deploy-steps.j2 @@ -746,8 +746,8 @@ outputs: path: /var/lib/tripleo-config/container-startup-config-1.json register: container_startup_configs_json_stat - import_tasks: common_deploy_steps_tasks.yaml - when: - - ((deploy_identifier is defined and deploy_identifier != "" and deploy_identifier is not none) or not container_startup_configs_json_stat.stat.exists) + when: (deploy_identifier is defined and deploy_identifier != "" and deploy_identifier is not none) or + (container_startup_configs_json_stat is defined and not container_startup_configs_json_stat.stat.exists) tags: - overcloud - deploy_steps