From 19c37fef7f3110c24271be9e440a80f4c765b214 Mon Sep 17 00:00:00 2001 From: Ruslan Aliev Date: Fri, 12 Jun 2020 04:20:39 -0500 Subject: [PATCH] Fix contol plane deployment ansible task There is need to ensure that appropriate directory does not exist before clonining source code into it, otherwise git throws an error. The destination folder name for cloning was fixed. Variable name which uses for task fail verification was corrected. Relates-To: #271 Closes: #271 Change-Id: I9c2bd03f68e6c34fc28b900f11dbaadd190087e8 Signed-off-by: Ruslan Aliev --- playbooks/airship-airshipctl-build-gate.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/playbooks/airship-airshipctl-build-gate.yaml b/playbooks/airship-airshipctl-build-gate.yaml index 738010075..797db240a 100644 --- a/playbooks/airship-airshipctl-build-gate.yaml +++ b/playbooks/airship-airshipctl-build-gate.yaml @@ -46,8 +46,13 @@ - name: get BareMetalHost from model block: + - name: ensure tempdir for airshipctl does not exist + file: + path: "{{ remote_work_dir }}" + state: absent + when: remote_work_dir is defined - name: clone document model - command: git clone -q {{ airship_config_primary_repo_url }} {{ remote_work_dir }}/airshipctl + command: git clone -q {{ airship_config_primary_repo_url }} {{ remote_work_dir }} when: remote_work_dir is defined - name: get BareMetalHost objects shell: | @@ -66,7 +71,7 @@ kustomize build {{ airship_config_manifest_directory }}/{{ airship_config_site_path }}/ephemeral/controlplane | kustomize config grep "metadata.name={{ item.spec.networkData.name }}" register: netdata_command - failed_when: "bmh_command.stdout == ''" + failed_when: "netdata_command.stdout == ''" environment: KUSTOMIZE_ENABLE_ALPHA_COMMANDS: "true" with_items: "{{ bmh }}"