Skip to content

Commit

Permalink
Merge pull request #311 from sap-linuxlab/dev
Browse files Browse the repository at this point in the history
Merge dev to main for release 1.2.1
  • Loading branch information
berndfinger authored Jan 25, 2023
2 parents d6756cb + 09a9389 commit f0deb28
Show file tree
Hide file tree
Showing 16 changed files with 377 additions and 135 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.yml linguist-detectable
10 changes: 10 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ community.sap_install Release Notes



v1.2.1
======

Release Summary
---------------

| Release Date: 2022-01-26
| A few minor fixes

v1.2.0
======

Expand Down
17 changes: 17 additions & 0 deletions docs/developer_notes/sap_swmp_dev.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# sap_swpm Ansible Role DEVELOPER NOTES

## Errors with missing signature files for installation media

After SWPM 1.0 SP22 and SAP SWPM 2.0 SP00, all SAP Software installation media requires a seperate signature file (SIGNATURE.SMF). The signature file is missing in older installation media.

For example, IDES for SAP ECC 6.0 EhP8. See the following error message and SAP Note 2622019 - "EXPORT_1 is not signed" error during IDES installation.
```shell
INFO
DU at '/software_path/51052029_1/EXP1' is not signed.

WARNING
Data unit '/software_path/51052029_1/EXP1' is not signed.
DETAILS: The found data unit must not be used.
SOLUTION: Ensure that you use the latest available version of Installation Export 1 ECC 6.0 EhP8 downloaded from the SAP Support Portal and ensure that its content is unchanged.
Not accepted
```


## SAP SWPM for SAP NWAS JAVA installations

There are two deployment methods executed for SAP SWPM for SAP NWAS JAVA, which uses two sequential executions:
Expand Down
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace: community
name: sap_install

# The version of the collection. Must be compatible with semantic versioning
version: 1.2.0
version: 1.2.1

# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
Expand Down
22 changes: 15 additions & 7 deletions roles/sap_general_preconfigure/tasks/RedHat/installation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,24 @@
state: present
when: ansible_distribution_major_version == '7'

# Note: We do not want package updates, see Red Hat bug 1983749.
- name: Ensure that the required package groups are installed, RHEL 8 and RHEL 9
ansible.builtin.dnf:
name: "{{ sap_general_preconfigure_packagegroups }}"
state: present
exclude: kernel*
nobest: true
# Note: We do not want package updates, see also Red Hat bug 1983749.
# Because the installation of an environment or package group is not guaranteed to avoid package updates,
# and because of bug 2011426 (for which the fix is not available in the RHEL 8.1 ISO image), a RHEL 8.1
# system might not boot after installing environment group Server.
- name: Ensure that the required package groups are installed, RHEL 8 and RHEL 9 # noqa command-instead-of-module
ansible.builtin.command: "yum install {{ sap_general_preconfigure_packagegroups | join(' ') }} --nobest --exclude=kernel* -y"
register: __sap_general_preconfigure_register_yum_group_install
when: ansible_distribution_major_version == '8' or ansible_distribution_major_version == '9'

# possible replacement once we no longer need Ansible 2.9 compatibility:
#- name: Ensure that the required package groups are installed, RHEL 8 and 9
# ansible.builtin.package:
# name: "{{ sap_general_preconfigure_packagegroups }}"
# state: present
# nobest: true # supported from Ansible 2.11
# register: __sap_general_preconfigure_register_yum_group_install
# when: ansible_distribution_major_version == '8' or ansible_distribution_major_version == '9'

- name: Ensure that the required packages are installed
ansible.builtin.package:
name: "{{ sap_general_preconfigure_packages }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/sap_install_media_detect/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ sap_install_media_detect_igs: true
sap_install_media_detect_kernel: true
sap_install_media_detect_webdisp: false

# saps4hana, sapecc, sapbw4hana, sapnwas_abap, sapnwas_java
# saps4hana, sapecc, sapecc_ides, sapbw4hana, sapnwas_abap, sapnwas_java
sap_install_media_detect_export:

# e.g. /db_backup
Expand Down
134 changes: 134 additions & 0 deletions roles/sap_install_media_detect/tasks/detect_export_sapecc_ides.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
---

- name: SAP Install Media Detect - SAP ECC IDES EXPORT - Create Directories
ansible.builtin.file:
path: "{{ item }}"
state: directory
mode: '0755'
owner: root
group: root
with_items:
- "{{ sap_install_media_detect_directory }}/sapecc_ides_export/"
- "{{ sap_install_media_detect_directory }}/sapecc_ides_export_extracted/"

- name: SAP Install Media Detect - SAP ECC IDES EXPORT - List files in directory
ansible.builtin.shell: ls -1
register: detect_directory_files
args:
chdir: "{{ sap_install_media_detect_directory }}"

- name: SAP Install Media Detect - SAP ECC IDES EXPORT - Detect ZIP files (including no file extensions), ignore errors
ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then echo {{ item }}; fi
register: detect_directory_files_zip
# changed_when: "item.stdout | length > 0"
with_items:
- "{{ detect_directory_files.stdout_lines }}"
args:
chdir: "{{ sap_install_media_detect_directory }}"
ignore_errors: true

- name: SAP Install Media Detect - SAP ECC IDES EXPORT - Detect RAR files (including no file extensions), ignore errors
ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'RAR')" ]; then echo {{ item }}; fi
register: detect_directory_files_rar
# changed_when: "item.stdout | length > 0"
with_items:
- "{{ detect_directory_files.stdout_lines }}"
args:
chdir: "{{ sap_install_media_detect_directory }}"
ignore_errors: true

- name: SAP Install Media Detect - SAP ECC IDES EXPORT - Identify SAP ECC IDES EXPORT files
ansible.builtin.shell: |
if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then if zipinfo -1 {{ item }} | grep -Eq '*EXP[0-9]' ; then echo '{{ item }}' ; fi ;
elif [ ! -z "$(file {{ item }} | grep 'RAR')" ]; then if "{{ sap_install_media_detect_unrar_binary }}" lb {{ item }} | grep -Eq '*EXP[0-9]' ; then echo '{{ item }}' ; fi ; fi
register: detect_directory_files_ecc_export
changed_when: "item | length > 0"
with_items:
- "{{ detect_directory_files_zip.results | map(attribute='stdout') | select() }}"
- "{{ detect_directory_files_rar.results | map(attribute='stdout') | select() }}"
args:
chdir: "{{ sap_install_media_detect_directory }}"

- name: SAP Install Media Detect - SAP ECC IDES EXPORT - If any ZIP, then extract the SAP ECC Installation Export file (unzip)
ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then unzip {{ item }} -d ./sapecc_ides_export_extracted ; fi
with_items:
- "{{ detect_directory_files_ecc_export.results | map(attribute='stdout') | select() }}"
args:
chdir: "{{ sap_install_media_detect_directory }}"

- name: SAP Install Media Detect - SAP ECC IDES EXPORT - If any RAR without file extension, then add file extension (for use with unrar binary)
ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'RAR archive data')" ]; then filename="{{ item }}" && if [ "${filename##*.}" != "rar" ]; then mv {{ item }} {{ item }}.rar ; fi ; fi
with_items:
- "{{ detect_directory_files_ecc_export.results | map(attribute='stdout') | select() }}"
args:
chdir: "{{ sap_install_media_detect_directory }}"

- name: SAP Install Media Detect - SAP ECC IDES EXPORT - Find self-extracting RAR EXE (parent RAR file) and extract SAP ECC Installation Export files (unrar x)
ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'RAR self-extracting archive')" ]; then "{{ sap_install_media_detect_unrar_binary }}" x "{{ item }}" sapecc_ides_export_extracted/ ; fi
with_items:
- "{{ detect_directory_files_ecc_export.results | map(attribute='stdout') | select() }}"
args:
chdir: "{{ sap_install_media_detect_directory }}"

- name: SAP Install Media Detect - SAP ECC IDES EXPORT - Identify SAP ECC IDES EXPORT extracted
ansible.builtin.find:
paths: "{{ sap_install_media_detect_directory }}/sapecc_ides_export_extracted"
recurse: yes
file_type: directory
# contains: "*EXP"
patterns: '.*EXP.*'
use_regex: yes
register: detect_directory_export_extracted

- name: SAP Install Media Detect - SAP ECC IDES EXPORT - Local Directory source - re-list files in directory
ansible.builtin.shell: ls -1
register: detect_directory_files
args:
chdir: "{{ sap_install_media_detect_directory }}"
when:
- sap_install_media_detect_source == "local_dir"

- name: SAP Install Media Detect - SAP ECC IDES EXPORT - Local Directory source - re-detect ZIP files (including no file extensions), ignore errors
ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then echo {{ item }}; fi
register: detect_directory_files_zip_repeated
# changed_when: "item.stdout | length > 0"
with_items:
- "{{ detect_directory_files.stdout_lines }}"
args:
chdir: "{{ sap_install_media_detect_directory }}"
ignore_errors: true
when:
- sap_install_media_detect_source == "local_dir"

- name: SAP Install Media Detect - SAP ECC IDES EXPORT - Local Directory source - re-detect RAR files (including no file extensions), ignore errors
ansible.builtin.shell: if [ ! -z "$(file {{ item }} | grep 'RAR')" ]; then echo {{ item }}; fi
register: detect_directory_files_rar_repeated
# changed_when: "item.stdout | length > 0"
with_items:
- "{{ detect_directory_files.stdout_lines }}"
args:
chdir: "{{ sap_install_media_detect_directory }}"
ignore_errors: true
when:
- sap_install_media_detect_source == "local_dir"

- name: SAP Install Media Detect - SAP ECC IDES EXPORT - Local Directory source - re-identify SAP ECC IDES EXPORT files
ansible.builtin.shell: |
if [ ! -z "$(file {{ item }} | grep 'Zip archive data')" ]; then if zipinfo -1 {{ item }} | grep -Eq '*EXP[0-9]' ; then echo '{{ item }}' ; fi ;
elif [ ! -z "$(file {{ item }} | grep 'RAR')" ]; then if "{{ sap_install_media_detect_unrar_binary }}" lb {{ item }} | grep -Eq '*EXP[0-9]' ; then echo '{{ item }}' ; fi ; fi
register: detect_directory_files_ecc_export_repeated
changed_when: "item | length > 0"
with_items:
- "{{ detect_directory_files_zip_repeated.results | map(attribute='stdout') | select() }}"
- "{{ detect_directory_files_rar_repeated.results | map(attribute='stdout') | select() }}"
args:
chdir: "{{ sap_install_media_detect_directory }}"
when:
- sap_install_media_detect_source == "local_dir"

- name: SAP Install Media Detect - SAP ECC IDES EXPORT - Local Directory source - move SAP ECC IDES EXPORT compressed archive files
command: mv "{{ sap_install_media_detect_directory }}/{{ item }}" "{{ sap_install_media_detect_directory }}/sapecc_ides_export/{{ item }}"
with_items:
- "{{ detect_directory_files_ecc_export_repeated.results | map(attribute='stdout') | select() }}"
when:
- sap_install_media_detect_source == "local_dir"
5 changes: 5 additions & 0 deletions roles/sap_install_media_detect/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@
when:
- sap_install_media_detect_export == "sapecc"

- name: SAP Install Media Detect - EXPORT files for SAP ECC IDES
include_tasks: "detect_export_sapecc_ides.yml"
when:
- sap_install_media_detect_export == "sapecc_ides"

- name: SAP Install Media Detect - EXPORT files for SAP S/4HANA
include_tasks: "detect_export_saps4hana.yml"
when:
Expand Down
2 changes: 1 addition & 1 deletion roles/sap_install_media_detect/tasks/set_global_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
sap_swpm_cd_export_path: "{{ detect_directory_export_extracted.files[0].path }}" # for sap_swpm Ansible Role
ignore_errors: true
when:
- sap_install_media_detect_export == "sapecc"
- sap_install_media_detect_export == "sapecc" or sap_install_media_detect_export == "sapecc_ides"

- name: SAP Install Media Detection Completed - set facts for Export of SAP S/4HANA
ansible.builtin.set_fact:
Expand Down
11 changes: 9 additions & 2 deletions roles/sap_netweaver_preconfigure/tasks/sapnote/3119751.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,23 @@
msg: "SAP note {{ (__sap_netweaver_preconfigure_sapnotes_versions | selectattr('number', 'match', '^3119751$') | first).number }}
(version {{ (__sap_netweaver_preconfigure_sapnotes_versions | selectattr('number', 'match', '^3119751$') | first).version }}): Linux Requirements for SAP Kernel 754 and for SAP Kernel 788 and higher"

- name: Create directory "{{ sap_netweaver_preconfigure_rpath }}"
- name: Get info about the compat-sap-c++-10.so file
ansible.builtin.stat:
path: /opt/rh/SAP/lib64/compat-sap-c++-10.so
register: __sap_netweaver_preconfigure_register_stat_compat_sap_cpp

- name: Create directory '{{ sap_netweaver_preconfigure_rpath }}'
ansible.builtin.file:
path: "{{ sap_netweaver_preconfigure_rpath }}"
state: directory
owner: root
group: root
mode: '0755'
when: __sap_netweaver_preconfigure_register_stat_compat_sap_cpp.stat.exists

- name: Create a link to libstdc++.so.6
- name: Create a link to '{{ sap_netweaver_preconfigure_rpath }}libstdc++.so.6'
ansible.builtin.file:
src: /opt/rh/SAP/lib64/compat-sap-c++-10.so
dest: "{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6"
state: link
when: __sap_netweaver_preconfigure_register_stat_compat_sap_cpp.stat.exists
40 changes: 28 additions & 12 deletions roles/sap_netweaver_preconfigure/tasks/sapnote/assert-3119751.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,46 @@
msg: "SAP note {{ (__sap_netweaver_preconfigure_sapnotes_versions | selectattr('number', 'match', '^3119751$') | first).number }}
(version {{ (__sap_netweaver_preconfigure_sapnotes_versions | selectattr('number', 'match', '^3119751$') | first).version }}): Linux Requirements for SAP Kernel 754 and for SAP Kernel 788 and higher"

- name: Get info about file "{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6"
- name: Get info about the compat-sap-c++-10.so file
ansible.builtin.stat:
path: /opt/rh/SAP/lib64/compat-sap-c++-10.so
register: __sap_netweaver_preconfigure_register_stat_compat_sap_cpp

- name: Report if checking for a link from libstdc++.so.6 to compat-sap-c++-10.so is skipped
ansible.builtin.debug:
msg: "INFO: Not checking for link '{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6' - file '/opt/rh/SAP/lib64/compat-sap-c++-10.so' does not exist on this system."
when: not __sap_netweaver_preconfigure_register_stat_compat_sap_cpp.stat.exists

- name: Get info about file '{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6'
ansible.builtin.stat:
path: "{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6"
register: __sap_netweaver_preconfigure_register_stat_libstdc_assert
when: __sap_netweaver_preconfigure_register_stat_compat_sap_cpp.stat.exists

- name: Assert that file "{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6" exists
- name: Assert that file '{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6' exists
ansible.builtin.assert:
that: __sap_netweaver_preconfigure_register_stat_libstdc_assert.stat.exists
fail_msg: "FAIL: File {{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6 does not exist!"
success_msg: "PASS: File {{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6 exists."
fail_msg: "FAIL: File '{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6' does not exist!"
success_msg: "PASS: File '{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6' exists."
ignore_errors: "{{ sap_netweaver_preconfigure_assert_ignore_errors | d(false) }}"
when: __sap_netweaver_preconfigure_register_stat_compat_sap_cpp.stat.exists

- name: Assert that file "{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6" is a link
- name: Assert that file '{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6' is a link
ansible.builtin.assert:
that: __sap_netweaver_preconfigure_register_stat_libstdc_assert.stat.islnk
fail_msg: "FAIL: File {{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6 is not a link!"
success_msg: "PASS: File {{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6 is a link."
fail_msg: "FAIL: File '{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6' is not a link!"
success_msg: "PASS: File '{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6' is a link."
ignore_errors: "{{ sap_netweaver_preconfigure_assert_ignore_errors | d(false) }}"
when: __sap_netweaver_preconfigure_register_stat_libstdc_assert.stat.exists
when:
- __sap_netweaver_preconfigure_register_stat_compat_sap_cpp.stat.exists
- __sap_netweaver_preconfigure_register_stat_libstdc_assert.stat.exists

- name: Assert that file "{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6" is a link to /opt/rh/SAP/lib64/compat-sap-c++-10.so
- name: Assert that file '{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6' is a link to '/opt/rh/SAP/lib64/compat-sap-c++-10.so'
ansible.builtin.assert:
that: __sap_netweaver_preconfigure_register_stat_libstdc_assert.stat.lnk_target == '/opt/rh/SAP/lib64/compat-sap-c++-10.so'
fail_msg: "FAIL: File {{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6 is not a link to /opt/rh/SAP/lib64/compat-sap-c++-10.so!"
success_msg: "PASS: File {{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6 is a link to /opt/rh/SAP/lib64/compat-sap-c++-10.so."
fail_msg: "FAIL: File '{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6' is not a link to '/opt/rh/SAP/lib64/compat-sap-c++-10.so!'"
success_msg: "PASS: File '{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6' is a link to '/opt/rh/SAP/lib64/compat-sap-c++-10.so.'"
ignore_errors: "{{ sap_netweaver_preconfigure_assert_ignore_errors | d(false) }}"
when: __sap_netweaver_preconfigure_register_stat_libstdc_assert.stat.exists
when:
- __sap_netweaver_preconfigure_register_stat_compat_sap_cpp.stat.exists
- __sap_netweaver_preconfigure_register_stat_libstdc_assert.stat.exists
6 changes: 5 additions & 1 deletion roles/sap_swpm/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,18 @@ sap_swpm_inifile_list:
- nw_config_central_services_abap
# - nw_config_central_services_java
- nw_config_primary_application_server_instance
- nw_config_additional_application_server_instance
# - nw_config_ers
- nw_config_ports
# - nw_config_java_ume
# - nw_config_java_feature_template_ids
# - nw_config_webdisp_generic
# - nw_config_webdisp_gateway
- nw_config_host_agent
# - nw_config_post_abap_reports
# - nw_config_post_load_abap_reports
# - nw_config_livecache
# - nw_config_sld
# - nw_config_abap_language_packages
- sap_os_linux_user

## Not in use
Expand Down
Loading

0 comments on commit f0deb28

Please sign in to comment.