Skip to content

Commit 24840b9

Browse files
authored
Merge pull request #1076 from berndfinger/issue-1075-needs-restarting-variable-assert-mode
sap_*_preconfigure: Define needs-restarting also for RHEL 10, assert mode
2 parents d18ddde + 6d9c3ee commit 24840b9

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,13 +278,11 @@
278278
__sap_general_preconfigure_fact_needs_restarting_command_assert: "needs-restarting -r"
279279
when: ansible_distribution_major_version == '7'
280280

281-
- name: "Assert - Set needs-restarting command in case of RHEL 8 or RHEL 9, except RHEL 8.0"
281+
- name: "Assert - Set needs-restarting command in case of RHEL 8 or greater, except RHEL 8.0"
282282
ansible.builtin.set_fact:
283283
__sap_general_preconfigure_fact_needs_restarting_command_assert: "yum needs-restarting -r"
284284
when:
285-
- (ansible_distribution_major_version == '8' or
286-
ansible_distribution_major_version == '9'
287-
)
285+
- ansible_distribution_major_version | int >= 8
288286
- ansible_distribution_version != '8.0'
289287

290288
- name: "Assert - Set customized needs-restarting command in case of RHEL 8.0"

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

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -207,17 +207,13 @@
207207
ansible.builtin.set_fact:
208208
__sap_hana_preconfigure_fact_needs_restarting_command_assert: "needs-restarting -r"
209209
when:
210-
- ansible_os_family == 'RedHat'
211210
- ansible_distribution_major_version == '7'
212211

213-
- name: "Assert - Set needs-restarting command in case of RHEL 8 or RHEL 9, except RHEL 8.0"
212+
- name: "Assert - Set needs-restarting command in case of RHEL 8 or greater, except RHEL 8.0"
214213
ansible.builtin.set_fact:
215214
__sap_hana_preconfigure_fact_needs_restarting_command_assert: "yum needs-restarting -r"
216215
when:
217-
- ansible_os_family == 'RedHat'
218-
- (ansible_distribution_major_version == '8' or
219-
ansible_distribution_major_version == '9'
220-
)
216+
- ansible_distribution_major_version | int >= 8
221217
- ansible_distribution_version != '8.0'
222218

223219
- name: "Assert - Set customized needs-restarting command in case of RHEL 8.0"
@@ -233,7 +229,7 @@
233229
var: __sap_hana_preconfigure_fact_needs_restarting_command_assert
234230

235231
# Reason for noqa: The command to be executed might contain pipes
236-
- name: Assert - Determine if system needs to be restarted # noqa command-instead-of-shell
232+
- name: Assert - Determine if the system needs to be restarted # noqa command-instead-of-shell
237233
ansible.builtin.shell: "{{ __sap_hana_preconfigure_fact_needs_restarting_command_assert }}"
238234
register: __sap_hana_preconfigure_register_needs_restarting_assert
239235
changed_when: false

0 commit comments

Comments
 (0)