Skip to content

Commit

Permalink
Merge pull request sap-linuxlab#781 from sean-freeman/media_detect_la…
Browse files Browse the repository at this point in the history
…bels

sap_install_media_detect: append loop labels
  • Loading branch information
berndfinger authored Jun 26, 2024
2 parents bdc923d + 7572e12 commit d516cff
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
ansible.builtin.set_fact:
__sap_install_media_detect_fact_find_result_phase_1: "{{ __sap_install_media_detect_fact_find_result_phase_1 + [item.path] }}"
loop: "{{ __sap_install_media_detect_register_find_result_phase_1.files }}"
loop_control:
label: "{{ item.path }}"

# If more than one SAPCAR file is found, we will use the last one.
- name: SAP Install Media Detect - Prepare - Identify sapcar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
ansible.builtin.set_fact:
__sap_install_media_detect_fact_find_result_phase_2: "{{ __sap_install_media_detect_fact_find_result_phase_2 + [item.path] }}"
loop: "{{ __sap_install_media_detect_register_find_result_phase_2.files }}"
loop_control:
label: "{{ item.path }}"

- name: SAP Install Media Detect - Prepare - Iterate over files and determine file type
ansible.builtin.command: "{{ __sap_install_media_detect_sapfile_path }} -e --lsar_file={{ __sap_install_media_detect_rar_list.split(' ')[0] }} --sapcar_file={{ __sap_install_media_detect_fact_sapcar_path }} {{ line_item }}"
Expand All @@ -35,6 +37,8 @@
ansible.builtin.set_fact:
__sap_install_media_detect_fact_files_sapfile_results: "{{ __sap_install_media_detect_fact_files_sapfile_results + [__new_dict] }}"
loop: "{{ __sap_install_media_detect_register_files_phase_2.results }}"
loop_control:
label: "{{ item.stdout.split(';')[0] }}"
vars:
__new_dict:
dir: "{{ item.stdout.split(';')[0] | dirname }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
- name: SAP Install Media Detect - Prepare - Set fact from find result, phase 1b
ansible.builtin.set_fact:
__sap_install_media_detect_fact_find_result_phase_1b: "{{ __sap_install_media_detect_fact_find_result_phase_1b + [item.1.path] }}"
with_subelements:
- "{{ __sap_install_media_detect_register_find_result_phase_1b.results }}"
- files
loop: "{{ __sap_install_media_detect_register_find_result_phase_1b.results | subelements('files') }}"
loop_control:
label: "{{ item.1.path }}"

# Reason for noqa: Too much additional code required for determining if anything has changed or not
- name: SAP Install Media Detect - Prepare - Move files back to '{{ __sap_install_media_detect_software_main_directory }}' # noqa no-changed-when
Expand Down

0 comments on commit d516cff

Please sign in to comment.