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 <raliev@mirantis.com>
This commit is contained in:
Ruslan Aliev 2020-06-12 04:20:39 -05:00
parent 42857f527b
commit 19c37fef7f

View File

@ -46,8 +46,13 @@
- name: get BareMetalHost from model - name: get BareMetalHost from model
block: 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 - 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 when: remote_work_dir is defined
- name: get BareMetalHost objects - name: get BareMetalHost objects
shell: | shell: |
@ -66,7 +71,7 @@
kustomize build {{ airship_config_manifest_directory }}/{{ airship_config_site_path }}/ephemeral/controlplane | kustomize build {{ airship_config_manifest_directory }}/{{ airship_config_site_path }}/ephemeral/controlplane |
kustomize config grep "metadata.name={{ item.spec.networkData.name }}" kustomize config grep "metadata.name={{ item.spec.networkData.name }}"
register: netdata_command register: netdata_command
failed_when: "bmh_command.stdout == ''" failed_when: "netdata_command.stdout == ''"
environment: environment:
KUSTOMIZE_ENABLE_ALPHA_COMMANDS: "true" KUSTOMIZE_ENABLE_ALPHA_COMMANDS: "true"
with_items: "{{ bmh }}" with_items: "{{ bmh }}"