diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-tsx.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-tsx.yml index f7ec8413b..951fdcd05 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-tsx.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/assert-tsx.yml @@ -5,15 +5,16 @@ when: - ansible_architecture == 'x86_64' - ansible_distribution == 'RedHat' - - ansible_distribution_major_version == '8' - - __sap_hana_preconfigure_fact_ansible_distribution_minor_version | int >= 3 + - (ansible_distribution_major_version >= '9') or + (ansible_distribution_major_version == '8' and + __sap_hana_preconfigure_fact_ansible_distribution_minor_version | int >= 3) block: # There are CPUs which are not capable of enabling the rtm flag, so we just report the status: - name: Get all CPU flags ansible.builtin.shell: set -o pipefail && lscpu | grep "^Flags:" register: __sap_hana_preconfigure_register_lscpu_flags - changed_when: no + changed_when: false - name: Report that the rtm CPU flag exists ansible.builtin.debug: @@ -30,7 +31,7 @@ - name: TSX - Get contents of GRUB_CMDLINE_LINUX in /etc/default/grub ansible.builtin.command: grep GRUB_CMDLINE_LINUX /etc/default/grub register: __sap_hana_preconfigure_register_default_grub_cmdline_tsx_assert - changed_when: no + changed_when: false - name: Assert that tsx=on is in GRUB_CMDLINE_LINUX in /etc/default/grub ansible.builtin.assert: @@ -57,7 +58,7 @@ - name: TSX - Get contents of /proc/cmdline ansible.builtin.command: cat /proc/cmdline register: __sap_hana_preconfigure_register_proc_cmdline_tsx_assert - changed_when: no + changed_when: false - name: Assert that tsx=on is in /proc/cmdline ansible.builtin.assert: diff --git a/roles/sap_hana_preconfigure/tasks/RedHat/generic/enable-tsx.yml b/roles/sap_hana_preconfigure/tasks/RedHat/generic/enable-tsx.yml index c0418df43..84c15b629 100644 --- a/roles/sap_hana_preconfigure/tasks/RedHat/generic/enable-tsx.yml +++ b/roles/sap_hana_preconfigure/tasks/RedHat/generic/enable-tsx.yml @@ -13,7 +13,8 @@ when: - ansible_architecture == 'x86_64' - ansible_distribution == 'RedHat' - - ansible_distribution_major_version == '8' - - __sap_hana_preconfigure_fact_ansible_distribution_minor_version|int >= 3 + - (ansible_distribution_major_version >= '9') or + (ansible_distribution_major_version == '8' and + __sap_hana_preconfigure_fact_ansible_distribution_minor_version | int >= 3) - not ( __sap_hana_preconfigure_register_proc_cmdline['content'] | b64decode | regex_findall('tsx=on') ) tags: grubconfig