Skip to content

Commit

Permalink
sap_install_media_detect: append loop labels
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-freeman committed Jun 26, 2024
1 parent f2e3eb0 commit 9977eb4
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 @@ -25,6 +25,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 @@ -21,6 +21,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 @@ -34,6 +36,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 @@ -46,9 +46,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.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 9977eb4

Please sign in to comment.