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
This commit is contained in:
James Slagle 2018-10-09 11:55:13 -04:00
parent ec227891bd
commit a7955832df

View File

@ -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