From a7955832dfcd9c41462db0242177c06354b8427a Mon Sep 17 00:00:00 2001 From: James Slagle Date: Tue, 9 Oct 2018 11:55:13 -0400 Subject: [PATCH] Honor --skip-deploy-identifier in common deploy tasks To match the previous functionality when not using config-download, the common deploy step tasks should be skipped for already deployed nodes when using --skip-deploy-identifier. This patch adds a task to check if one of the json configuration files created by the common tasks already exists. If it does, and --skip-deploy-identifier has caused an empty DeployIdentifier parameter value, the tasks will be skipped for that node. Change-Id: I711dbb00a9c34dbd96ef179ef41bff281b0001d1 Closes-Bug: #1796924 --- common/deploy-steps.j2 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/deploy-steps.j2 b/common/deploy-steps.j2 index ca89b4497b..f2f05d667b 100644 --- a/common/deploy-steps.j2 +++ b/common/deploy-steps.j2 @@ -562,8 +562,15 @@ outputs: bootstrap_server_id: BOOTSTRAP_SERVER_ID step: '{{step}}' container_cli: CONTAINER_CLI + update_identifier: UPDATE_IDENTIFIER tasks: + - name: Check if /var/lib/docker-container-startup-configs.json already exists + stat: + path: /var/lib/docker-container-startup-configs.json + register: docker_container_startup_configs_json_stat - import_tasks: common_deploy_steps_tasks.yaml + when: + - (update_identifier != "" or not docker_container_startup_configs_json_stat.stat.exists) tags: - overcloud - deploy_steps