Skip to content

Commit

Permalink
Update pre_requisites.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Shubhangi-dell <[email protected]>
  • Loading branch information
Shubhangi-dell committed Apr 11, 2023
1 parent 762949b commit 0f55df8
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions provision/roles/xcat_discovery_provision/tasks/pre_requisites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,21 @@
failed_when: false
register: diskful_osimage_precheck

- name: Retry fetching xcat osimage name for provision_os
ansible.builtin.shell: >
set -o pipefail && \
lsdef -t osimage | grep "{{ osimage_search_key }}" | grep "{{ provision_os }}"
changed_when: false
failed_when: false
register: preretry_fetch_osimage
when: diskful_osimage_precheck.rc !=0

- name: Fail if osimage not present
ansible.builtin.fail:
msg: "{{ repo_precheck }}"
when:
- diskful_osimage_precheck.stdout == ""
- diskful_osimage_precheck.stderr == ""
- preretry_fetch_osimage.rc is defined
- preretry_fetch_osimage.rc != 0

- name: Set reprovision_status to true
ansible.builtin.set_fact:
Expand Down

0 comments on commit 0f55df8

Please sign in to comment.