diff --git a/playbooks/vars/sample-variables-sap-swpm-default-mode-solman-hana-abap-onehost-install.yml b/playbooks/vars/sample-variables-sap-swpm-default-mode-solman-hana-abap-onehost-install.yml index d1d9c10e0..2840f34cb 100644 --- a/playbooks/vars/sample-variables-sap-swpm-default-mode-solman-hana-abap-onehost-install.yml +++ b/playbooks/vars/sample-variables-sap-swpm-default-mode-solman-hana-abap-onehost-install.yml @@ -45,7 +45,7 @@ sap_swpm_cd_export_pt1_path: /software/download_basket/SOLMAN/51054655_1_DIR sap_swpm_cd_export_pt2_path: /software/download_basket/SOLMAN/51054655_2_DIR sap_swpm_cd_language_path: /software/download_basket/SOLMAN/51054655_3_DIR sap_swpm_cd_java_path: /software/download_basket/SOLMAN/51054655_4_DIR -sap_swpm_cd_rdms_path: /software/download_basket/SAPINST/SAP_HANA/51054623 +sap_swpm_cd_rdbms_path: /software/download_basket/SAPINST/SAP_HANA/51054623 # NW Passwords sap_swpm_master_password: "NewPass$321" diff --git a/playbooks/vars/sample-variables-sap-swpm-default-mode-solman-hana-java-onehost-install.yml b/playbooks/vars/sample-variables-sap-swpm-default-mode-solman-hana-java-onehost-install.yml index 6014fe636..7bc9bd3e8 100644 --- a/playbooks/vars/sample-variables-sap-swpm-default-mode-solman-hana-java-onehost-install.yml +++ b/playbooks/vars/sample-variables-sap-swpm-default-mode-solman-hana-java-onehost-install.yml @@ -47,7 +47,7 @@ sap_swpm_cd_export_pt1_path: /software/download_basket/SOLMAN/51054655_1_DIR sap_swpm_cd_export_pt2_path: /software/download_basket/SOLMAN/51054655_2_DIR sap_swpm_cd_language_path: /software/download_basket/SOLMAN/51054655_3_DIR sap_swpm_cd_java_path: /software/download_basket/SOLMAN/51054655_4_DIR -sap_swpm_cd_rdms_path: /software/download_basket/SAPINST/SAP_HANA/51054623 +sap_swpm_cd_rdbms_path: /software/download_basket/SAPINST/SAP_HANA/51054623 # NW Passwords sap_swpm_master_password: "NewPass$321" diff --git a/roles/sap_install_media_detect/defaults/main.yml b/roles/sap_install_media_detect/defaults/main.yml index 7a118b4fd..b99bbeb35 100644 --- a/roles/sap_install_media_detect/defaults/main.yml +++ b/roles/sap_install_media_detect/defaults/main.yml @@ -37,7 +37,7 @@ sap_install_media_detect_rar_extract: '/usr/bin/unrar x' # Fully qualified path to an additional argument to the program for extracting RAR files, for specifying the directory into # which the archive is to be extracted. Needs to be empty or start with a space character. # If sap_install_media_detect_rar_package is set to 'EPEL', this variable is not used. -#sap_install_media_detect_rar_extract_argument: ' -o' +#sap_install_media_detect_rar_extract_directory_argument: ' -o' sap_install_media_detect_rar_extract_directory_argument: '' # Directory where the SAP software is located @@ -63,22 +63,33 @@ sap_install_media_detect_move_or_copy_archives: true # By default, the presence of at least one file for each file type according to the configured role parameters is asserted. Set the # following parameter to 'false' to skip this step. -#sap_install_media_detect_assert_after_sapfile: false - -# saphana, sapase, sapmaxdb, oracledb, ibmdb2 -#sap_install_media_detect_db: 'saphana' -sap_install_media_detect_db: '' +sap_install_media_detect_assert_after_sapfile: true +# Typical parameter settings for SAP S/4HANA: +sap_install_media_detect_db: 'saphana' # saphana, sapase, sapmaxdb, oracledb, ibmdb2 +sap_install_media_detect_db_client: 'saphana' # saphana, sapase, sapmaxdb, oracledb, ibmdb2 sap_install_media_detect_swpm: true sap_install_media_detect_hostagent: true sap_install_media_detect_igs: true sap_install_media_detect_kernel: true -# saphana, sapase, sapmaxdb, oracledb, ibmdb2 -#sap_install_media_detect_kernel_db: 'sapmaxdb' +#sap_install_media_detect_kernel_db: 'saphana' # 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 - -# saps4hana, sapbw4hana, sapecc, sapecc_ides, sapnwas_abap, sapnwas_java, sapsolman_abap, sapsolman_java -sap_install_media_detect_export: +sap_install_media_detect_export: 'saps4hana' # saps4hana, sapbw4hana, sapecc, sapecc_ides, +# sapnwas_abap, sapnwas_java, sapsolman_abap, sapsolman_java + +# Typical parameter settings for SAP ERP 6.0 EHP8 with SAP HANA database: +#sap_install_media_detect_db: 'saphana' # saphana, sapase, sapmaxdb, oracledb, ibmdb2 +#sap_install_media_detect_db_client: 'saphana' # saphana, sapase, sapmaxdb, oracledb, ibmdb2 +#sap_install_media_detect_swpm: true +#sap_install_media_detect_hostagent: true +#sap_install_media_detect_igs: true +#sap_install_media_detect_kernel: true +#sap_install_media_detect_kernel_db: 'saphana' # 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_export: 'sapecc' # saps4hana, sapbw4hana, sapecc, sapecc_ides, +# sapnwas_abap, sapnwas_java, sapsolman_abap, sapsolman_java # e.g. /db_backup sap_install_media_detect_backup_directory: diff --git a/roles/sap_install_media_detect/tasks/organize_files.yml b/roles/sap_install_media_detect/tasks/organize_files.yml index cc7019ad5..0d0c53833 100644 --- a/roles/sap_install_media_detect/tasks/organize_files.yml +++ b/roles/sap_install_media_detect/tasks/organize_files.yml @@ -132,14 +132,26 @@ - line_item.archive_type == 'rarexe' - line_item.extract_archive == 'y' +- name: SAP Install Media Detect - Organize all files - Create temp dir for sapcar archive files - {{ __sap_install_media_detect_software_main_directory }}/tmp_extract + ansible.builtin.file: + path: "{{ __sap_install_media_detect_software_main_directory }}/tmp_extract" + state: directory + owner: root + group: root + mode: '0755' + - name: SAP Install Media Detect - Organize all files - Extract sapcar archive files - ansible.builtin.command: >- + ansible.builtin.shell: >- {{ __sap_install_media_detect_fact_sapcar_path }} - -R {{ __sap_install_media_detect_software_main_directory }}/{{ line_item.extraction_dir }} - -xvf {{ line_item.file }} + -R {{ __sap_install_media_detect_software_main_directory }}/tmp_extract + -xvf {{ __sap_install_media_detect_software_main_directory }}/{{ line_item.file }} -manifest SIGNATURE.SMF + && extracted_dir=$(ls -d */) + && mv SIGNATURE.SMF $extracted_dir + && mkdir -p {{ __sap_install_media_detect_software_main_directory }}/{{ line_item.extraction_dir }}/$extracted_dir + && mv $extracted_dir {{ __sap_install_media_detect_software_main_directory }}/{{ line_item.extraction_dir }}/ args: - chdir: "{{ __sap_install_media_detect_software_main_directory }}" + chdir: "{{ __sap_install_media_detect_software_main_directory }}/tmp_extract" loop: "{{ __sap_install_media_detect_fact_files_sapfile_results }}" loop_control: loop_var: line_item @@ -148,17 +160,10 @@ - line_item.archive_type == 'sapcar' - line_item.extract_archive == 'y' -- name: SAP Install Media Detect - Organize all files - Move SIGNATURE.SMF into subdir for SAP HANA non-export files - ansible.builtin.shell: | - extracted_dir=$(ls -d */) - mv SIGNATURE.SMF ${extracted_dir} - args: - chdir: "{{ __sap_install_media_detect_software_main_directory }}/{{ line_item.extraction_dir }}" - loop: "{{ __sap_install_media_detect_fact_files_sapfile_results }}" - loop_control: - loop_var: line_item - when: - - line_item.sap_file_type is search("saphana") +- name: SAP Install Media Detect - Organize all files - Remove temp dir - {{ __sap_install_media_detect_software_main_directory }}/tmp_extract + ansible.builtin.file: + path: "{{ __sap_install_media_detect_software_main_directory }}/tmp_extract" + state: absent - name: SAP Install Media Detect - Organize all files - Copy certain files to 'sap_hana' directory ansible.builtin.copy: diff --git a/roles/sap_install_media_detect/tasks/prepare/create_file_list_phase_2.yml b/roles/sap_install_media_detect/tasks/prepare/create_file_list_phase_2.yml index aab5000c2..b22b500e2 100644 --- a/roles/sap_install_media_detect/tasks/prepare/create_file_list_phase_2.yml +++ b/roles/sap_install_media_detect/tasks/prepare/create_file_list_phase_2.yml @@ -219,7 +219,8 @@ - __sap_install_media_detect_fact_files_sapfile_results | selectattr('sap_file_type', 'equalto', 'saphana_client') | length > 0 fail_msg: "No file found for saphana_client" when: - - (sap_install_media_detect_db | d('')) == 'saphana' + - (sap_install_media_detect_db | d('')) == 'saphana' or + (sap_install_media_detect_db_client | d('')) == 'saphana' - name: SAP Install Media Detect - Prepare - Assert that sapase is present ansible.builtin.assert: @@ -235,7 +236,8 @@ - __sap_install_media_detect_fact_files_sapfile_results | selectattr('sap_file_type', 'equalto', 'sapase_client') | length > 0 fail_msg: "No file found for sapase_client" when: - - (sap_install_media_detect_db | d('')) == 'sapase' + - (sap_install_media_detect_db | d('')) == 'sapase' or + (sap_install_media_detect_db_client | d('')) == 'sapase' - name: SAP Install Media Detect - Prepare - Assert that sapmaxdb is present ansible.builtin.assert: @@ -259,7 +261,8 @@ - __sap_install_media_detect_fact_files_sapfile_results | selectattr('sap_file_type', 'equalto', 'oracledb_client') | length > 0 fail_msg: "No file found for oracledb_client" when: - - (sap_install_media_detect_db | d('')) == 'oracledb' + - (sap_install_media_detect_db | d('')) == 'oracledb' or + (sap_install_media_detect_db_client | d('')) == 'oracledb' - name: SAP Install Media Detect - Prepare - Assert that ibmdb2 is present ansible.builtin.assert: @@ -275,7 +278,8 @@ - __sap_install_media_detect_fact_files_sapfile_results | selectattr('sap_file_type', 'equalto', 'ibmdb2_client') | length > 0 fail_msg: "No file found for ibmdb2_client" when: - - (sap_install_media_detect_db | d('')) == 'ibmdb2' + - (sap_install_media_detect_db | d('')) == 'ibmdb2' or + (sap_install_media_detect_db_client | d('')) == 'ibmdb2' - name: SAP Install Media Detect - Prepare - Assert that ibmdb2_license is present ansible.builtin.assert: diff --git a/roles/sap_install_media_detect/tasks/set_global_vars.yml b/roles/sap_install_media_detect/tasks/set_global_vars.yml index a39469ff5..a52c16ed5 100644 --- a/roles/sap_install_media_detect/tasks/set_global_vars.yml +++ b/roles/sap_install_media_detect/tasks/set_global_vars.yml @@ -55,7 +55,7 @@ - name: SAP Install Media Detect - Detection completed - Set facts for SAP HANA - sap_swpm ansible.builtin.set_fact: - sap_swpm_cd_rdms_path: "{{ sap_hana_client_path.files[0].path }}/" # for sap_swpm Ansible Role + sap_swpm_cd_rdbms_path: "{{ sap_hana_client_path.files[0].path }}/" # for sap_swpm Ansible Role ignore_errors: true when: - sap_install_media_detect_move_or_copy_archives @@ -204,7 +204,7 @@ - sap_swpm_cd_oracle_path - sap_swpm_cd_sapase_path - sap_swpm_cd_sapmaxdb_path - - sap_swpm_cd_rdms_path + - sap_swpm_cd_rdbms_path - sap_swpm_cd_ibmdb2_client_path - sap_swpm_cd_oracle_client_path - sap_swpm_cd_sapase_client_path diff --git a/roles/sap_swpm/defaults/main.yml b/roles/sap_swpm/defaults/main.yml index 4434d9f79..f1e146786 100644 --- a/roles/sap_swpm/defaults/main.yml +++ b/roles/sap_swpm/defaults/main.yml @@ -138,7 +138,7 @@ sap_swpm_cd_export_pt1_path: sap_swpm_cd_export_pt2_path: sap_swpm_cd_language_path: sap_swpm_cd_java_path: -sap_swpm_cd_rdms_path: +sap_swpm_cd_rdbms_path: sap_swpm_cd_export_path: sap_swpm_cd_ibmdb2_path: sap_swpm_cd_ibmdb2_client_path: diff --git a/roles/sap_swpm/templates/configfile.j2 b/roles/sap_swpm/templates/configfile.j2 index a4148526e..e59f930b6 100644 --- a/roles/sap_swpm/templates/configfile.j2 +++ b/roles/sap_swpm/templates/configfile.j2 @@ -25,7 +25,7 @@ HDB_Software_Dialogs.useMediaCD = {{ sap_swpm_software_use_media }} ###### SAPINST.CD.PACKAGE.LANGUAGE = {{ sap_swpm_cd_language_path }} SAPINST.CD.PACKAGE.JAVA = {{ sap_swpm_cd_java_path }} -SAPINST.CD.PACKAGE.RDBMS = {{ sap_swpm_cd_rdms_path }} +SAPINST.CD.PACKAGE.RDBMS = {{ sap_swpm_cd_rdbms_path }} # SAPINST.CD.PACKAGE.KERNEL = # SAPINST.CD.PACKAGE.KERNEL2 = # SAPINST.CD.PACKAGE.KERNEL3 =