Skip to content

Commit b3903db

Browse files
committed
enhance sles16 saptune handling and update pattern name
1 parent c130c93 commit b3903db

File tree

6 files changed

+40
-10
lines changed

6 files changed

+40
-10
lines changed

roles/sap_general_preconfigure/tasks/SLES/generic/saptune_takeover.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
---
33
# 1275776 - Linux: Preparing SLES for SAP environments
44

5+
# saptune_check fails if 'saptune service takeover' was not executed.
56
- name: Execute saptune_check - before takeover
67
ansible.builtin.command:
78
cmd: saptune_check
@@ -10,10 +11,12 @@
1011
changed_when: false
1112
failed_when: false
1213

13-
- name: Takeover and enable saptune
14+
- name: Takeover saptune
1415
when:
1516
- __sap_general_preconfigure_use_saptune
1617
- __sap_general_preconfigure_register_saptune_check_before.rc != 0
18+
# sapconf is not present on SLES 16 and takeover is not required.
19+
- ansible_distribution_major_version | int < 16
1720
block:
1821
- name: Check saptune version # noqa: command-instead-of-module
1922
ansible.builtin.command:
@@ -27,7 +30,7 @@
2730
name: sapconf
2831
state: stopped
2932
enabled: false
30-
when: __sap_general_preconfigure_register_sapconf
33+
when: __sap_general_preconfigure_register_sapconf.rc == 0
3134

3235
- name: Make sure that sapconf and tuned are stopped and disabled
3336
ansible.builtin.command:
@@ -42,13 +45,21 @@
4245
register: __sap_general_preconfigure_register_sapconf_failed
4346
changed_when: false
4447
ignore_errors: true
48+
when: __sap_general_preconfigure_register_sapconf.rc == 0
4549

4650
- name: Execute systemctl reset-failed sapconf.service # noqa command-instead-of-module
4751
ansible.builtin.command:
4852
cmd: systemctl reset-failed sapconf.service
49-
when: __sap_general_preconfigure_register_sapconf_failed.rc == 0
53+
when:
54+
- __sap_general_preconfigure_register_sapconf.rc == 0
55+
- __sap_general_preconfigure_register_sapconf_failed.rc == 0
5056
changed_when: true
5157

58+
59+
- name: Enable saptune service
60+
when:
61+
- __sap_general_preconfigure_use_saptune
62+
block:
5263
- name: Ensure saptune is running and enabled
5364
ansible.builtin.systemd:
5465
name: saptune

roles/sap_general_preconfigure/vars/SLES_SAP_16.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
__sap_general_preconfigure_sapnotes_versions: []
77

88
__sap_general_preconfigure_patterns:
9-
- sles_minimal_sap
9+
- sles_sap_minimal_sap
1010

1111
__sap_general_preconfigure_packages:
1212
# Patterns are not included in package list

roles/sap_hana_preconfigure/tasks/SLES/generic/saptune_takeover.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010
changed_when: false
1111
failed_when: false
1212

13-
- name: Takeover and enable saptune
13+
- name: Takeover saptune
1414
when:
1515
- __sap_hana_preconfigure_use_saptune
1616
- __sap_hana_preconfigure_register_saptune_check_before.rc != 0
17+
# sapconf is not present on SLES 16 and takeover is not required.
18+
- ansible_distribution_major_version | int < 16
1719
block:
1820
- name: Check saptune version # noqa: command-instead-of-module
1921
ansible.builtin.command:
@@ -27,7 +29,7 @@
2729
name: sapconf
2830
state: stopped
2931
enabled: false
30-
when: __sap_hana_preconfigure_register_sapconf
32+
when: __sap_hana_preconfigure_register_sapconf.rc == 0
3133

3234
- name: Make sure that sapconf and tuned are stopped and disabled
3335
ansible.builtin.command:
@@ -49,6 +51,11 @@
4951
when: __sap_hana_preconfigure_register_sapconf_failed.rc == 0
5052
changed_when: true
5153

54+
55+
- name: Enable saptune service
56+
when:
57+
- __sap_hana_preconfigure_use_saptune
58+
block:
5259
- name: Ensure saptune is running and enabled
5360
ansible.builtin.systemd:
5461
name: saptune

roles/sap_hana_preconfigure/vars/SLES_SAP_16.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
# - SUSE Linux Enterprise Server for SAP Applications 16
55

66
__sap_hana_preconfigure_sapnotes_versions: []
7+
# 3577842 - - SAP HANA DB: Recommended OS settings for SLES 16 / SLES for SAP Applications 16
8+
# - { number: '3577842', version: '1' }
79

810
__sap_hana_preconfigure_min_pkgs:
911

1012
__sap_hana_preconfigure_patterns:
11-
- sles_minimal_sap
13+
- sles_sap_minimal_sap
1214
- sles_sap_DB
1315

1416
__sap_hana_preconfigure_packages:
@@ -24,6 +26,9 @@ __sap_hana_preconfigure_packages:
2426
- sysstat
2527
- sysctl-logger
2628

29+
# 3577842
30+
- libltdl7
31+
2732
# 3139184 - Linux: systemd integration for sapstartsrv and SAP Host Agent
2833
- polkit
2934

roles/sap_netweaver_preconfigure/tasks/SLES/generic/saptune_takeover.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010
changed_when: false
1111
failed_when: false
1212

13-
- name: Takeover and enable saptune
13+
- name: Takeover saptune
1414
when:
1515
- __sap_netweaver_preconfigure_use_saptune
1616
- __sap_netweaver_preconfigure_register_saptune_check_before.rc != 0
17+
# sapconf is not present on SLES 16 and takeover is not required.
18+
- ansible_distribution_major_version | int < 16
1719
block:
1820
- name: Check saptune version # noqa: command-instead-of-module
1921
ansible.builtin.command:
@@ -27,7 +29,7 @@
2729
name: sapconf
2830
state: stopped
2931
enabled: false
30-
when: __sap_netweaver_preconfigure_register_sapconf
32+
when: __sap_netweaver_preconfigure_register_sapconf.rc == 0
3133

3234
- name: Make sure that sapconf and tuned are stopped and disabled
3335
ansible.builtin.command:
@@ -49,6 +51,11 @@
4951
when: __sap_netweaver_preconfigure_register_sapconf_failed.rc == 0
5052
changed_when: true
5153

54+
55+
- name: Enable saptune service
56+
when:
57+
- __sap_netweaver_preconfigure_use_saptune
58+
block:
5259
- name: Ensure saptune is running and enabled
5360
ansible.builtin.systemd:
5461
name: saptune

roles/sap_netweaver_preconfigure/vars/SLES_SAP_16.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
__sap_netweaver_preconfigure_sapnotes_versions: []
77

88
__sap_netweaver_preconfigure_patterns:
9-
- sles_minimal_sap
9+
- sles_sap_minimal_sap
1010
- sles_sap_APP
1111

1212
__sap_netweaver_preconfigure_packages:

0 commit comments

Comments
 (0)