Skip to content

Commit 9ee20c7

Browse files
authored
Merge pull request #943 from sap-linuxlab/dev
merge dev to main for release 1.5.2
2 parents a872878 + 49ad193 commit 9ee20c7

File tree

136 files changed

+3596
-1030
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+3596
-1030
lines changed

CHANGELOG.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,25 @@ community.sap_install Release Notes
55
.. contents:: Topics
66

77

8+
1.5.2
9+
Release Summary
10+
---------------
11+
- Release Date: 2025-01-24
12+
13+
This is a bugfix release of the `community.sap_install` collection.
14+
15+
Changes
16+
-------------
17+
- sap_*_preconfigure: Add code for RHEL 10 support (https://github.com/sap-linuxlab/community.sap_install/pull/938)
18+
- sap_*_preconfigure/Suse: Rework of preconfigure roles for Suse, add missing notes. (https://github.com/sap-linuxlab/community.sap_install/pull/930)
19+
20+
Bugfixes
21+
--------
22+
- sap_netweaver_preconfigure: fix argument_specs validation error (https://github.com/sap-linuxlab/community.sap_install/pull/940)
23+
- sap_general_preconfigure: No longer install locale packages in RHEL 7 (https://github.com/sap-linuxlab/community.sap_install/pull/937)
24+
- sap_general_preconfigure: Fix check mode (https://github.com/sap-linuxlab/community.sap_install/pull/935)
25+
26+
827
1.5.1
928
Release Summary
1029
---------------

changelogs/changelog.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,3 +290,15 @@ releases:
290290
- sap_install_media_detect: Fix wrong sap_export_solman_java detection (https://github.com/sap-linuxlab/community.sap_install/pull/913)
291291
'
292292
release_date: '2025-01-15'
293+
1.5.2:
294+
changes:
295+
release_summary: '| Release Date: 2025-01-24
296+
changes:
297+
- sap_*_preconfigure: Add code for RHEL 10 support (https://github.com/sap-linuxlab/community.sap_install/pull/938)
298+
- sap_*_preconfigure/Suse: Rework of preconfigure roles for Suse, add missing notes. (https://github.com/sap-linuxlab/community.sap_install/pull/930)
299+
bugfixes:
300+
- sap_netweaver_preconfigure: fix argument_specs validation error (https://github.com/sap-linuxlab/community.sap_install/pull/940)
301+
- sap_general_preconfigure: No longer install locale packages in RHEL 7 (https://github.com/sap-linuxlab/community.sap_install/pull/937)
302+
- sap_general_preconfigure: Fix check mode (https://github.com/sap-linuxlab/community.sap_install/pull/935)
303+
'
304+
release_date: '2025-01-24'

galaxy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace: community
1111
name: sap_install
1212

1313
# The version of the collection. Must be compatible with semantic versioning
14-
version: 1.5.1
14+
version: 1.5.2
1515

1616
# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
1717
readme: README.md

roles/sap_general_preconfigure/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ The IPV4 address to be used for updating or checking `/etc/hosts` entries.<br>
432432
### sap_general_preconfigure_db_group_name
433433
- _Type:_ `str`
434434

435-
Use this variable to specify the name of the RHEL group which is used for the database processes.<br>
435+
(RedHat specific) Use this variable to specify the name of the RHEL group which is used for the database processes.<br>
436436
If defined, it will be used to configure process limits as per step<br>
437437
Configuring Process Resource Limits<br>
438438

roles/sap_general_preconfigure/defaults/main.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ sap_general_preconfigure_envgroups: "{{ __sap_general_preconfigure_envgroups }}"
7979
# Example: See README.md
8080

8181
sap_general_preconfigure_packages: "{{ __sap_general_preconfigure_packages }}"
82-
# The list of packages to install.
82+
# The list of packages to be installed.
8383
# The default for this variable is set in the vars file which corresponds to the detected OS version.
8484

8585
sap_general_preconfigure_min_package_check: true
@@ -164,11 +164,20 @@ sap_general_preconfigure_domain: "{{ sap_domain | d(ansible_domain) }}"
164164
# The DNS domain name to be used for updating or checking `/etc/hosts` entries.
165165

166166
# sap_general_preconfigure_db_group_name: (not defined by default)
167-
# Use this variable to specify the name of the RHEL group which is used for the database processes.
167+
# (RedHat specific) Use this variable to specify the name of the RHEL group which is used for the database processes.
168168
# If defined, it will be used to configure process limits as per step
169169
# Configuring Process Resource Limits
170170
# Example: See README.md
171171

172+
sap_general_preconfigure_run_grub2_mkconfig: true
173+
# By default, the role will run `grub2-mkconfig` to update the Grub configuration if necessary.
174+
# Set this parameter to `false` if this is not desired.
175+
176+
# (SUSE specific) Version of saptune to install.
177+
# It is recommended to install latest version by keeping this variable empty.
178+
# This will replace the current installed version if present, even downgrade if necessary.
179+
sap_general_preconfigure_saptune_version: ''
180+
172181
# in SAP Note 2369910 SAP requires English locale
173182
# If you want to define the locale set this to e.g. en_US.UTF-8
174183
sap_general_preconfigure_default_locale: ""

roles/sap_general_preconfigure/handlers/main.yml

Lines changed: 94 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,136 @@
11
# SPDX-License-Identifier: Apache-2.0
22
---
3-
# handlers file for sap_general_preconfigure
3+
4+
# BEGIN - GRUB section
5+
- name: "Check if server is booted in BIOS or UEFI mode"
6+
ansible.builtin.stat:
7+
path: /sys/firmware/efi
8+
get_checksum: false
9+
register: __sap_general_preconfigure_register_stat_sys_firmware_efi
10+
listen: __sap_general_preconfigure_regenerate_grub2_conf_handler
11+
when:
12+
- sap_general_preconfigure_run_grub2_mkconfig | d(true)
13+
14+
- name: Debug BIOS or UEFI
15+
ansible.builtin.debug:
16+
var: __sap_general_preconfigure_register_stat_sys_firmware_efi.stat.exists
17+
listen: __sap_general_preconfigure_regenerate_grub2_conf_handler
18+
when:
19+
- sap_general_preconfigure_run_grub2_mkconfig | d(true)
20+
21+
- name: "Run grub-mkconfig (BIOS mode)"
22+
ansible.builtin.command:
23+
cmd: grub2-mkconfig -o /boot/grub2/grub.cfg
24+
register: __sap_general_preconfigure_register_grub2_mkconfig_bios_mode
25+
changed_when: true
26+
listen: __sap_general_preconfigure_regenerate_grub2_conf_handler
27+
notify: __sap_general_preconfigure_reboot_handler
28+
when:
29+
- not __sap_general_preconfigure_register_stat_sys_firmware_efi.stat.exists
30+
- sap_general_preconfigure_run_grub2_mkconfig | d(true)
31+
32+
- name: "Debug grub-mkconfig BIOS mode"
33+
ansible.builtin.debug:
34+
var: __sap_general_preconfigure_register_grub2_mkconfig_bios_mode.stdout_lines,
35+
__sap_general_preconfigure_register_grub2_mkconfig_bios_mode.stderr_lines
36+
listen: __sap_general_preconfigure_regenerate_grub2_conf_handler
37+
when:
38+
- not __sap_general_preconfigure_register_stat_sys_firmware_efi.stat.exists
39+
- sap_general_preconfigure_run_grub2_mkconfig | d(true)
40+
41+
- name: "Set the grub.cfg location RHEL"
42+
ansible.builtin.set_fact:
43+
__sap_general_preconfigure_uefi_boot_dir: /boot/efi/EFI/redhat/grub.cfg
44+
listen: __sap_general_preconfigure_regenerate_grub2_conf_handler
45+
when:
46+
- ansible_distribution == 'RedHat'
47+
48+
- name: "Set the grub.cfg location SLES"
49+
ansible.builtin.set_fact:
50+
__sap_general_preconfigure_uefi_boot_dir: /boot/efi/EFI/BOOT/grub.cfg
51+
listen: __sap_general_preconfigure_regenerate_grub2_conf_handler
52+
when:
53+
- ansible_distribution == 'SLES' or ansible_distribution == 'SLES_SAP'
54+
55+
- name: "Run grub-mkconfig (UEFI mode)"
56+
ansible.builtin.command:
57+
cmd: "grub2-mkconfig -o {{ __sap_general_preconfigure_uefi_boot_dir }}"
58+
register: __sap_general_preconfigure_register_grub2_mkconfig_uefi_mode
59+
changed_when: true
60+
listen: __sap_general_preconfigure_regenerate_grub2_conf_handler
61+
notify: __sap_general_preconfigure_reboot_handler
62+
when:
63+
- __sap_general_preconfigure_register_stat_sys_firmware_efi.stat.exists
64+
- sap_general_preconfigure_run_grub2_mkconfig | d(true)
65+
66+
- name: "Debug grub-mkconfig UEFI"
67+
ansible.builtin.debug:
68+
var: __sap_general_preconfigure_register_grub2_mkconfig_uefi_mode.stdout_lines,
69+
__sap_general_preconfigure_register_grub2_mkconfig_uefi_mode.stderr_lines
70+
listen: __sap_general_preconfigure_regenerate_grub2_conf_handler
71+
when:
72+
- __sap_general_preconfigure_register_stat_sys_firmware_efi.stat.exists
73+
- sap_general_preconfigure_run_grub2_mkconfig | d(true)
74+
75+
# END - GRUB section
76+
477

578
- name: Reboot the managed node
679
ansible.builtin.reboot:
780
test_command: /bin/true
881
listen: __sap_general_preconfigure_reboot_handler
982
when:
10-
- sap_general_preconfigure_reboot_ok|d(false)
83+
- sap_general_preconfigure_reboot_ok | d(false)
84+
1185

1286
# Kernel update triggers zypper purge-kernels and lock after reboot.
1387
- name: Wait for Zypper lock to be released
1488
ansible.builtin.command:
1589
cmd: zypper info zypper
16-
retries: 60
17-
timeout: 5
90+
retries: 20
91+
timeout: 30
1892
listen: __sap_general_preconfigure_reboot_handler
1993
when:
2094
- ansible_os_family == 'Suse'
2195
- sap_general_preconfigure_reboot_ok | d(false)
2296
changed_when: false
2397

98+
2499
- name: Let the role fail if a reboot is required
25100
ansible.builtin.fail:
26101
msg: Reboot is required!
27102
listen: __sap_general_preconfigure_reboot_handler
28103
when:
29-
- sap_general_preconfigure_fail_if_reboot_required|d(true)
30-
- not sap_general_preconfigure_reboot_ok|d(false)
104+
- sap_general_preconfigure_fail_if_reboot_required | d(true)
105+
- not sap_general_preconfigure_reboot_ok | d(false)
31106

32107
- name: Show a warning message if a reboot is required
33108
ansible.builtin.debug:
34109
msg: "WARN: Reboot is required!"
35110
listen: __sap_general_preconfigure_reboot_handler
36111
when:
37-
- not sap_general_preconfigure_fail_if_reboot_required|d(true)
38-
- not sap_general_preconfigure_reboot_ok|d(false)
112+
- not sap_general_preconfigure_fail_if_reboot_required | d(true)
113+
- not sap_general_preconfigure_reboot_ok | d(false)
114+
115+
- name: Unmask packagekit.service
116+
ansible.builtin.systemd_service:
117+
name: packagekit.service
118+
masked: false
119+
listen: __sap_general_preconfigure_packagekit_handler
120+
39121

40122
# Reasons for noqa:
41123
# - command-instead-of-module: We want to avoid non-ansible.builtin modules where possible
42124
# - no-changed-when: Remounting does not do any harm and does not affect idempotency.
43125
- name: Remount /dev/shm # noqa command-instead-of-module no-changed-when
44-
ansible.builtin.command: mount -o remount /dev/shm
126+
ansible.builtin.command:
127+
cmd: mount -o remount /dev/shm
45128
listen: __sap_general_preconfigure_mount_tmpfs_handler
46129
tags: molecule-idempotence-notest
47130

48131
- name: Check if /dev/shm is available
49-
ansible.builtin.command: df -h /dev/shm
132+
ansible.builtin.command:
133+
cmd: df -h /dev/shm
50134
register: __sap_general_preconfigure_command_df_shm_result
51135
changed_when: false
52136
listen: __sap_general_preconfigure_mount_tmpfs_handler

roles/sap_general_preconfigure/meta/argument_specs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ argument_specs:
172172
sap_general_preconfigure_packages:
173173
default: "{{ __sap_general_preconfigure_packages }}"
174174
description:
175-
- The list of packages to install.
175+
- The list of packages to be installed.
176176
- The default for this variable is set in the vars file which corresponds to the detected OS version.
177177
required: false
178178
type: list

roles/sap_general_preconfigure/tasks/RedHat/assert-configuration.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# SPDX-License-Identifier: Apache-2.0
22
---
33

4+
- name: Gather package facts again after the installation phase
5+
ansible.builtin.package_facts:
6+
tags:
7+
- always
8+
49
- name: Assert - List required SAP Notes
510
ansible.builtin.debug:
611
var: __sap_general_preconfigure_sapnotes_versions | difference([''])

roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# SPDX-License-Identifier: Apache-2.0
22
---
33

4+
- name: Gather package facts
5+
ansible.builtin.package_facts:
6+
tags:
7+
- sap_general_preconfigure_installation
8+
49
- name: Check enabled repos
510
when: sap_general_preconfigure_enable_repos
611
block:

roles/sap_general_preconfigure/tasks/RedHat/configuration.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# SPDX-License-Identifier: Apache-2.0
22
---
33

4+
- name: Gather package facts again after the installation phase
5+
ansible.builtin.package_facts:
6+
tags:
7+
- always
8+
49
- name: Configure - List required SAP Notes
510
ansible.builtin.debug:
611
var: __sap_general_preconfigure_sapnotes_versions | difference([''])

0 commit comments

Comments
 (0)