Skip to content

Commit d0ee859

Browse files
authored
Merge pull request sap-linuxlab#1100 from sap-linuxlab/dev
Merge dev to main for release 1.7.1
2 parents a134a3a + 848e08f commit d0ee859

22 files changed

Lines changed: 260 additions & 170 deletions

CHANGELOG.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,21 @@ community.sap\_install Release Notes
44

55
.. contents:: Topics
66

7+
v1.7.1
8+
======
9+
10+
Release Summary
11+
---------------
12+
13+
A few fixes
14+
15+
Bugfixes
16+
--------
17+
18+
- sap_hana_install - Enhance validation of variables (https://github.com/sap-linuxlab/community.sap_install/pull/1096)
19+
- sap_hana_preconfigure - New mechanism for loading rhel minor plus vars without having to use "find" files on localhost. (https://github.com/sap-linuxlab/community.sap_install/pull/1097)
20+
- sap_hana_preconfigure/RHEL - Be more flexible with boot command line args (https://github.com/sap-linuxlab/community.sap_install/pull/1098)
21+
722
v1.7.0
823
======
924

changelogs/changelog.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,3 +353,12 @@ releases:
353353
- sap_hana_preconfigure - Replace grub2-mkconfig for RHEL by grubby from RHEL 8 onward (https://github.com/sap-linuxlab/community.sap_install/pull/1083)
354354
- sap_hana_install - Enhance SAPCAR detection functionality and handling of multiple files (https://github.com/sap-linuxlab/community.sap_install/pull/1082)
355355
- sap_ha_pacemaker_cluster - Enhance handling of cluster properties and improve ASCS ERS post steps (https://github.com/sap-linuxlab/community.sap_install/pull/1084)
356+
357+
1.7.1:
358+
release_date: '2025-08-05'
359+
changes:
360+
release_summary: A few fixes
361+
bugfixes:
362+
- sap_hana_install - Enhance validation of variables (https://github.com/sap-linuxlab/community.sap_install/pull/1096)
363+
- sap_hana_preconfigure - New mechanism for loading rhel minor plus vars without having to use "find" files on localhost. (https://github.com/sap-linuxlab/community.sap_install/pull/1097)
364+
- sap_hana_preconfigure/RHEL - Be more flexible with boot command line args (https://github.com/sap-linuxlab/community.sap_install/pull/1098)

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.7.0
14+
version: 1.7.1
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_hana_install/defaults/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ sap_hana_install_components: 'all'
134134
# sap_hana_install_hdblcm_extraargs: '--ignore=check_diskspace,check_min_mem'
135135

136136
# Instance details
137-
sap_hana_install_sid:
138-
sap_hana_install_number:
137+
sap_hana_install_sid: ''
138+
sap_hana_install_number: ''
139139
sap_hana_install_root_path: "{{ '/' + sap_hana_install_install_path.split('/')[1] if sap_hana_install_install_path is defined else '/hana' }}"
140140
sap_hana_install_shared_path: "{{ sap_hana_install_install_path | d(sap_hana_install_root_path + '/shared') }}"
141141

roles/sap_hana_install/tasks/main.yml

Lines changed: 79 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,114 @@
11
# SPDX-License-Identifier: Apache-2.0
22
---
33

4+
# Load variables while maintaining backwards compatibility when variable is empty string.
5+
# Check if variable is defined and non-empty before using it, otherwise fall back to backwards
6+
# compatible variable or default empty string that will fail asserts afterwards.
47
- name: Rename some variables used by hdblcm configfile
58
ansible.builtin.set_fact:
6-
sap_hana_install_sid: "{{ sap_hana_sid | d(sap_hana_install_sid) | d('') }}"
7-
sap_hana_install_number: "{{ sap_hana_instance_number | d(sap_hana_install_instance_nr) | d(sap_hana_install_instance_number) | d(sap_hana_install_number) | d('') }}"
8-
sap_hana_install_master_password: "{{ sap_hana_install_common_master_password | d(sap_hana_install_master_password) }}"
9-
sap_hana_install_system_usage: "{{ sap_hana_install_env_type | d(sap_hana_install_system_usage) }}"
10-
sap_hana_install_restrict_max_mem: "{{ sap_hana_install_mem_restrict | d(sap_hana_install_restrict_max_mem) }}"
9+
sap_hana_install_sid:
10+
"{{ sap_hana_sid | d('')
11+
if sap_hana_install_sid | string | length == 0
12+
else sap_hana_install_sid }}"
13+
sap_hana_install_number:
14+
"{{ sap_hana_instance_number | d(sap_hana_install_instance_nr) | d(sap_hana_install_instance_number) | d('')
15+
if sap_hana_install_number | string | length == 0
16+
else sap_hana_install_number }}"
17+
sap_hana_install_system_usage: "{{ sap_hana_install_env_type | d(sap_hana_install_system_usage) | d('custom') }}"
18+
sap_hana_install_restrict_max_mem: "{{ sap_hana_install_mem_restrict | d(sap_hana_install_restrict_max_mem) | d('n') }}"
1119
tags:
1220
- sap_hana_install_check_hana_exists
1321
- sap_hana_install_check_installation
1422
- sap_hana_install_preinstall
1523
- sap_hana_install_set_log_mode
1624
- sap_hana_install_configure_firewall
1725

18-
- name: Fail if necessary variable 'sap_hana_install_sid' is not defined
19-
ansible.builtin.fail:
20-
msg: "The variable 'sap_hana_install_sid' is not defined."
21-
when: sap_hana_install_sid | length == 0
26+
# Separate task for password with no_log
27+
- name: Rename some variables used by hdblcm configfile - passwords
28+
ansible.builtin.set_fact:
29+
sap_hana_install_master_password:
30+
"{{ sap_hana_install_common_master_password | d('')
31+
if sap_hana_install_master_password is not defined or sap_hana_install_master_password | string | length == 0
32+
else sap_hana_install_master_password }}"
33+
no_log: true # Required for password handling
2234
tags:
2335
- sap_hana_install_check_hana_exists
36+
- sap_hana_install_check_installation
2437
- sap_hana_install_preinstall
38+
- sap_hana_install_set_log_mode
39+
- sap_hana_install_configure_firewall
40+
2541

26-
- name: Validate SAP HANA System ID - 'sap_hana_install_sid' consists of 3 characters
42+
- name: Validate SAP HANA System ID - 'sap_hana_install_sid' is defined as String consisting of 3 characters
2743
ansible.builtin.assert:
28-
that: sap_hana_install_sid | length == 3
29-
success_msg: "PASS: The length of the SAP System ID '{{ sap_hana_install_sid }}' is 3 characters."
30-
fail_msg: "FAIL: The length of the SAP HANA System ID '{{ sap_hana_install_sid }}' is not 3 characters!"
44+
that:
45+
- sap_hana_install_sid is defined
46+
- sap_hana_install_sid is string
47+
- sap_hana_install_sid | length == 3
48+
success_msg: |
49+
PASS: The length of the SAP HANA System ID '{{ sap_hana_install_sid }}' is 3 characters.
50+
fail_msg: |
51+
{% if sap_hana_install_sid is not string %}
52+
FAIL: The variable 'sap_hana_install_sid' is not String. Value: {{ sap_hana_install_sid }}
53+
{% elif sap_hana_install_sid | length == 0 %}
54+
FAIL: The variable 'sap_hana_install_sid' is empty.
55+
{% else %}
56+
FAIL: The length of the SAP HANA System ID '{{ sap_hana_install_sid }}' is not 3 characters!
57+
{% endif %}
3158
tags:
3259
- sap_hana_install_check_hana_exists
3360
- sap_hana_install_preinstall
3461

3562
- name: Validate SAP HANA System ID - 'sap_hana_install_sid' is not in the list of reserved SAP SIDs
3663
ansible.builtin.assert:
3764
that: sap_hana_install_sid not in __sap_hana_install_sid_prohibited
38-
success_msg: "PASS: The SAP HANA System ID '{{ sap_hana_install_sid }}' is not in the list of reserved SAP SIDs in SAP note 1979280 v.20."
39-
fail_msg: "FAIL: The SAP HANA System ID '{{ sap_hana_install_sid }}' is in the list of reserved SAP SIDs in SAP note 1979280 v.20!"
65+
success_msg: |
66+
PASS: The SAP HANA System ID '{{ sap_hana_install_sid }}' is not in the list of reserved SAP SIDs in SAP note 1979280 v.20.
67+
fail_msg: |
68+
FAIL: The SAP HANA System ID '{{ sap_hana_install_sid }}' is in the list of reserved SAP SIDs in SAP note 1979280 v.20!
69+
tags:
70+
- sap_hana_install_check_hana_exists
71+
- sap_hana_install_preinstall
72+
73+
- name: Validate SAP HANA Instance Number - 'sap_hana_install_number' is defined as String consisting of 2 characters
74+
ansible.builtin.assert:
75+
that:
76+
- sap_hana_install_number is defined
77+
- sap_hana_install_number is string
78+
- sap_hana_install_number | length == 2
79+
success_msg: |
80+
PASS: The length of the SAP HANA Instance Number '{{ sap_hana_install_number }}' is 2 characters.
81+
fail_msg: |
82+
{% if sap_hana_install_number is not string %}
83+
FAIL: The variable 'sap_hana_install_number' is not String. Value: {{ sap_hana_install_number }}
84+
{% elif sap_hana_install_number | length == 0 %}
85+
FAIL: The variable 'sap_hana_install_number' is empty.
86+
{% else %}
87+
FAIL: The length of the SAP HANA Instance Number '{{ sap_hana_install_number }}' is not 2 characters!
88+
{% endif %}
4089
tags:
4190
- sap_hana_install_check_hana_exists
4291
- sap_hana_install_preinstall
4392

44-
- name: Fail if necessary variable 'sap_hana_install_number' is not defined
45-
ansible.builtin.fail:
46-
msg: "The variable 'sap_hana_install_number' is not defined."
47-
when: sap_hana_install_number | length == 0
93+
- name: Validate SAP HANA Master Password - 'sap_hana_install_master_password' is defined as String and not empty
94+
ansible.builtin.assert:
95+
that:
96+
- sap_hana_install_master_password is defined
97+
- sap_hana_install_master_password is string
98+
- sap_hana_install_master_password | length > 0
99+
fail_msg: |
100+
{% if sap_hana_install_master_password is not defined %}
101+
FAIL: The variable 'sap_hana_install_master_password' is not defined.
102+
{% elif sap_hana_install_master_password is not string %}
103+
FAIL: The variable 'sap_hana_install_master_password' is not String.
104+
{% else %}
105+
FAIL: The variable 'sap_hana_install_master_password' is empty.
106+
{% endif %}
48107
tags:
49108
- sap_hana_install_check_hana_exists
50109
- sap_hana_install_preinstall
51110

111+
52112
- name: SAP HANA existence checking
53113
ansible.builtin.import_tasks: hana_exists.yml
54114
when:

0 commit comments

Comments
 (0)