Skip to content

Commit

Permalink
sap_install_media_detect: Also identify the MP XML files and set the …
Browse files Browse the repository at this point in the history
…related variables
  • Loading branch information
berndfinger committed Sep 27, 2023
1 parent 5eee620 commit f430d74
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions roles/sap_install_media_detect/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ sap_install_media_detect_kernel: false
sap_install_media_detect_kernel_db: '' # saphana, sapase, sapmaxdb, oracledb, ibmdb2
# (only necessary if there is more than one SAPEXEDB file in the source directory)
sap_install_media_detect_webdisp: false
sap_install_media_detect_mpstack: false
sap_install_media_detect_export: '' # saps4hana, sapbw4hana, sapecc, sapecc_ides,
# sapnwas_abap, sapnwas_java, sapsolman_abap, sapsolman_java

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,14 @@
- sap_install_media_detect_webdisp
- sap_swpm_web_dispatcher_file_name_get.stdout_lines | count > 1

- name: SAP Install Media Detect - Find files after extraction - Find Maintenance Planner Stack XML file
ansible.builtin.shell: set -o pipefail && ls -1tr *.xml | tail -1
args:
chdir: "{{ sap_swpm_software_path }}"
register: sap_swpm_mp_xml_file_name_get
changed_when: false
when: sap_install_media_detect_mpstack

- name: SAP Install Media Detect - Find files after extraction - Find SAP ECC Export
ansible.builtin.find:
paths: "{{ __sap_install_media_detect_software_main_directory }}/sap_export_ecc_extracted"
Expand Down
9 changes: 9 additions & 0 deletions roles/sap_install_media_detect/tasks/set_global_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,13 @@
sap_swpm_igs_helper_file_name: "{{ sap_swpm_igs_helper_file_name_get.stdout }}"
when: sap_install_media_detect_igs

- name: SAP Install Media Detect - Detection completed - Set facts for SAP Maintenance Planner Stack XML files
ansible.builtin.set_fact:
sap_swpm_mp_stack_path: "{{ sap_swpm_software_path }}/"
sap_swpm_mp_stack_file_name: "{{ sap_swpm_mp_xml_file_name_get.stdout }}"
ignore_errors: true
when: sap_install_media_detect_mpstack

- name: SAP Install Media Detect - Detection completed - Set facts for WebDisp
ansible.builtin.set_fact:
sap_swpm_web_dispatcher_path: "{{ sap_swpm_software_path }}/"
Expand Down Expand Up @@ -241,6 +248,8 @@
- sap_swpm_kernel_independent_file_name
- sap_swpm_web_dispatcher_path
- sap_swpm_web_dispatcher_file_name
- sap_swpm_mp_stack_path
- sap_swpm_mp_stack_file_name

- name: SAP Install Media Detect - Detection completed - Display result
ansible.builtin.debug:
Expand Down

0 comments on commit f430d74

Please sign in to comment.