Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge dev to main for release 1.5.2 #943

Merged
merged 23 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
4425cd1
feat: sap_general_preconfigure Suse reworked
marcelmamula Jan 14, 2025
85de6d2
feat: hana and netweaver preconfigure for Suse
marcelmamula Jan 17, 2025
d1ad5cb
sap*preconfigure: Add initial code for RHEL 10
berndfinger Jan 21, 2025
4177fe1
feat: removed dependencies on ansible_facts.packages
marcelmamula Jan 22, 2025
a5305fe
sap_general_preconfigure: Add RHEL 10
berndfinger Jan 22, 2025
e791d93
sap_hana_preconfigure: Add RHEL 10
berndfinger Jan 22, 2025
58831c1
sap_general_preconfigure: Also change the SAP note numbers in task files
berndfinger Jan 22, 2025
c2d8f8a
sap_hana_preconfigure: Also change the SAP note numbers in task files
berndfinger Jan 22, 2025
25e86ff
feat: remove python3-rpm from installation
marcelmamula Jan 22, 2025
f075adb
sap_hana_preconfigure: openssl11 is not needed for RHEL 10
berndfinger Jan 22, 2025
e215bac
sap_general_preconfigure: Fix check mode
berndfinger Jan 23, 2025
8e13a6c
sap_ha_pacemaker_cluster: Fix codespell
berndfinger Jan 23, 2025
04e0999
fix: update packages var description
marcelmamula Jan 23, 2025
c186f3e
Merge pull request #930 from marcelmamula/sles16rebase
berndfinger Jan 23, 2025
8bda967
sap_general_preconfigure: No longer install locale packages in RHEL 7
berndfinger Jan 23, 2025
0c6cd33
Merge pull request #935 from berndfinger/issue-934
berndfinger Jan 23, 2025
c94c55e
Merge pull request #937 from berndfinger/issue-936-rhel7-locale-en
berndfinger Jan 23, 2025
70d7cb1
Merge pull request #938 from berndfinger/issue-833-rhel-10-new
berndfinger Jan 23, 2025
260196c
sap_netweaver_preconfigure: fix argument_specs validation error
berndfinger Jan 23, 2025
8515230
Merge pull request #940 from berndfinger/issue-939
berndfinger Jan 24, 2025
7eeac2c
collection: prepare for v1.5.2
berndfinger Jan 24, 2025
6a5ffb0
collection: add missing PR to changelogs
berndfinger Jan 24, 2025
49ad193
Merge pull request #942 from berndfinger/new-release-1.5.2
berndfinger Jan 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@ community.sap_install Release Notes
.. contents:: Topics


1.5.2
Release Summary
---------------
- Release Date: 2025-01-24

This is a bugfix release of the `community.sap_install` collection.

Changes
-------------
- sap_*_preconfigure: Add code for RHEL 10 support (https://github.com/sap-linuxlab/community.sap_install/pull/938)
- sap_*_preconfigure/Suse: Rework of preconfigure roles for Suse, add missing notes. (https://github.com/sap-linuxlab/community.sap_install/pull/930)

Bugfixes
--------
- sap_netweaver_preconfigure: fix argument_specs validation error (https://github.com/sap-linuxlab/community.sap_install/pull/940)
- sap_general_preconfigure: No longer install locale packages in RHEL 7 (https://github.com/sap-linuxlab/community.sap_install/pull/937)
- sap_general_preconfigure: Fix check mode (https://github.com/sap-linuxlab/community.sap_install/pull/935)


1.5.1
Release Summary
---------------
Expand Down
12 changes: 12 additions & 0 deletions changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -290,3 +290,15 @@ releases:
- sap_install_media_detect: Fix wrong sap_export_solman_java detection (https://github.com/sap-linuxlab/community.sap_install/pull/913)
'
release_date: '2025-01-15'
1.5.2:
changes:
release_summary: '| Release Date: 2025-01-24
changes:
- sap_*_preconfigure: Add code for RHEL 10 support (https://github.com/sap-linuxlab/community.sap_install/pull/938)
- sap_*_preconfigure/Suse: Rework of preconfigure roles for Suse, add missing notes. (https://github.com/sap-linuxlab/community.sap_install/pull/930)
bugfixes:
- sap_netweaver_preconfigure: fix argument_specs validation error (https://github.com/sap-linuxlab/community.sap_install/pull/940)
- sap_general_preconfigure: No longer install locale packages in RHEL 7 (https://github.com/sap-linuxlab/community.sap_install/pull/937)
- sap_general_preconfigure: Fix check mode (https://github.com/sap-linuxlab/community.sap_install/pull/935)
'
release_date: '2025-01-24'
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace: community
name: sap_install

# The version of the collection. Must be compatible with semantic versioning
version: 1.5.1
version: 1.5.2

# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
Expand Down
2 changes: 1 addition & 1 deletion roles/sap_general_preconfigure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ The IPV4 address to be used for updating or checking `/etc/hosts` entries.<br>
### sap_general_preconfigure_db_group_name
- _Type:_ `str`

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

Expand Down
13 changes: 11 additions & 2 deletions roles/sap_general_preconfigure/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ sap_general_preconfigure_envgroups: "{{ __sap_general_preconfigure_envgroups }}"
# Example: See README.md

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

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

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

sap_general_preconfigure_run_grub2_mkconfig: true
# By default, the role will run `grub2-mkconfig` to update the Grub configuration if necessary.
# Set this parameter to `false` if this is not desired.

# (SUSE specific) Version of saptune to install.
# It is recommended to install latest version by keeping this variable empty.
# This will replace the current installed version if present, even downgrade if necessary.
sap_general_preconfigure_saptune_version: ''

# in SAP Note 2369910 SAP requires English locale
# If you want to define the locale set this to e.g. en_US.UTF-8
sap_general_preconfigure_default_locale: ""
Expand Down
104 changes: 94 additions & 10 deletions roles/sap_general_preconfigure/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,136 @@
# SPDX-License-Identifier: Apache-2.0
---
# handlers file for sap_general_preconfigure

# BEGIN - GRUB section
- name: "Check if server is booted in BIOS or UEFI mode"
ansible.builtin.stat:
path: /sys/firmware/efi
get_checksum: false
register: __sap_general_preconfigure_register_stat_sys_firmware_efi
listen: __sap_general_preconfigure_regenerate_grub2_conf_handler
when:
- sap_general_preconfigure_run_grub2_mkconfig | d(true)

- name: Debug BIOS or UEFI
ansible.builtin.debug:
var: __sap_general_preconfigure_register_stat_sys_firmware_efi.stat.exists
listen: __sap_general_preconfigure_regenerate_grub2_conf_handler
when:
- sap_general_preconfigure_run_grub2_mkconfig | d(true)

- name: "Run grub-mkconfig (BIOS mode)"
ansible.builtin.command:
cmd: grub2-mkconfig -o /boot/grub2/grub.cfg
register: __sap_general_preconfigure_register_grub2_mkconfig_bios_mode
changed_when: true
listen: __sap_general_preconfigure_regenerate_grub2_conf_handler
notify: __sap_general_preconfigure_reboot_handler
when:
- not __sap_general_preconfigure_register_stat_sys_firmware_efi.stat.exists
- sap_general_preconfigure_run_grub2_mkconfig | d(true)

- name: "Debug grub-mkconfig BIOS mode"
ansible.builtin.debug:
var: __sap_general_preconfigure_register_grub2_mkconfig_bios_mode.stdout_lines,
__sap_general_preconfigure_register_grub2_mkconfig_bios_mode.stderr_lines
listen: __sap_general_preconfigure_regenerate_grub2_conf_handler
when:
- not __sap_general_preconfigure_register_stat_sys_firmware_efi.stat.exists
- sap_general_preconfigure_run_grub2_mkconfig | d(true)

- name: "Set the grub.cfg location RHEL"
ansible.builtin.set_fact:
__sap_general_preconfigure_uefi_boot_dir: /boot/efi/EFI/redhat/grub.cfg
listen: __sap_general_preconfigure_regenerate_grub2_conf_handler
when:
- ansible_distribution == 'RedHat'

- name: "Set the grub.cfg location SLES"
ansible.builtin.set_fact:
__sap_general_preconfigure_uefi_boot_dir: /boot/efi/EFI/BOOT/grub.cfg
listen: __sap_general_preconfigure_regenerate_grub2_conf_handler
when:
- ansible_distribution == 'SLES' or ansible_distribution == 'SLES_SAP'

- name: "Run grub-mkconfig (UEFI mode)"
ansible.builtin.command:
cmd: "grub2-mkconfig -o {{ __sap_general_preconfigure_uefi_boot_dir }}"
register: __sap_general_preconfigure_register_grub2_mkconfig_uefi_mode
changed_when: true
listen: __sap_general_preconfigure_regenerate_grub2_conf_handler
notify: __sap_general_preconfigure_reboot_handler
when:
- __sap_general_preconfigure_register_stat_sys_firmware_efi.stat.exists
- sap_general_preconfigure_run_grub2_mkconfig | d(true)

- name: "Debug grub-mkconfig UEFI"
ansible.builtin.debug:
var: __sap_general_preconfigure_register_grub2_mkconfig_uefi_mode.stdout_lines,
__sap_general_preconfigure_register_grub2_mkconfig_uefi_mode.stderr_lines
listen: __sap_general_preconfigure_regenerate_grub2_conf_handler
when:
- __sap_general_preconfigure_register_stat_sys_firmware_efi.stat.exists
- sap_general_preconfigure_run_grub2_mkconfig | d(true)

# END - GRUB section


- name: Reboot the managed node
ansible.builtin.reboot:
test_command: /bin/true
listen: __sap_general_preconfigure_reboot_handler
when:
- sap_general_preconfigure_reboot_ok|d(false)
- sap_general_preconfigure_reboot_ok | d(false)


# Kernel update triggers zypper purge-kernels and lock after reboot.
- name: Wait for Zypper lock to be released
ansible.builtin.command:
cmd: zypper info zypper
retries: 60
timeout: 5
retries: 20
timeout: 30
listen: __sap_general_preconfigure_reboot_handler
when:
- ansible_os_family == 'Suse'
- sap_general_preconfigure_reboot_ok | d(false)
changed_when: false


- name: Let the role fail if a reboot is required
ansible.builtin.fail:
msg: Reboot is required!
listen: __sap_general_preconfigure_reboot_handler
when:
- sap_general_preconfigure_fail_if_reboot_required|d(true)
- not sap_general_preconfigure_reboot_ok|d(false)
- sap_general_preconfigure_fail_if_reboot_required | d(true)
- not sap_general_preconfigure_reboot_ok | d(false)

- name: Show a warning message if a reboot is required
ansible.builtin.debug:
msg: "WARN: Reboot is required!"
listen: __sap_general_preconfigure_reboot_handler
when:
- not sap_general_preconfigure_fail_if_reboot_required|d(true)
- not sap_general_preconfigure_reboot_ok|d(false)
- not sap_general_preconfigure_fail_if_reboot_required | d(true)
- not sap_general_preconfigure_reboot_ok | d(false)

- name: Unmask packagekit.service
ansible.builtin.systemd_service:
name: packagekit.service
masked: false
listen: __sap_general_preconfigure_packagekit_handler


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

- name: Check if /dev/shm is available
ansible.builtin.command: df -h /dev/shm
ansible.builtin.command:
cmd: df -h /dev/shm
register: __sap_general_preconfigure_command_df_shm_result
changed_when: false
listen: __sap_general_preconfigure_mount_tmpfs_handler
Expand Down
2 changes: 1 addition & 1 deletion roles/sap_general_preconfigure/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ argument_specs:
sap_general_preconfigure_packages:
default: "{{ __sap_general_preconfigure_packages }}"
description:
- The list of packages to install.
- The list of packages to be installed.
- The default for this variable is set in the vars file which corresponds to the detected OS version.
required: false
type: list
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# SPDX-License-Identifier: Apache-2.0
---

- name: Gather package facts again after the installation phase
ansible.builtin.package_facts:
tags:
- always

- name: Assert - List required SAP Notes
ansible.builtin.debug:
var: __sap_general_preconfigure_sapnotes_versions | difference([''])
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# SPDX-License-Identifier: Apache-2.0
---

- name: Gather package facts
ansible.builtin.package_facts:
tags:
- sap_general_preconfigure_installation

- name: Check enabled repos
when: sap_general_preconfigure_enable_repos
block:
Expand Down
5 changes: 5 additions & 0 deletions roles/sap_general_preconfigure/tasks/RedHat/configuration.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# SPDX-License-Identifier: Apache-2.0
---

- name: Gather package facts again after the installation phase
ansible.builtin.package_facts:
tags:
- always

- name: Configure - List required SAP Notes
ansible.builtin.debug:
var: __sap_general_preconfigure_sapnotes_versions | difference([''])
Expand Down
5 changes: 5 additions & 0 deletions roles/sap_general_preconfigure/tasks/RedHat/installation.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# SPDX-License-Identifier: Apache-2.0
---

- name: Gather package facts
ansible.builtin.package_facts:
tags:
- sap_general_preconfigure_installation

- name: Perform steps for enabling required repos
when: sap_general_preconfigure_enable_repos
block:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@

- name: Assert - Include configuration actions for required sapnotes
ansible.builtin.include_tasks: "sapnote/assert-{{ sap_note_line_item.number }}.yml"
with_items: "{{ __sap_general_preconfigure_sapnotes_versions | difference(['']) }}"
loop: "{{ __sap_general_preconfigure_sapnotes_versions | difference(['']) }}"
loop_control:
loop_var: sap_note_line_item
Loading
Loading