From b28bb8706a0b14328ade6616942881c76149306c Mon Sep 17 00:00:00 2001 From: DependencyBot Date: Sun, 1 Dec 2024 07:23:56 +0000 Subject: [PATCH 01/38] Update requirements-workflow.txt on Sun Dec 1 07:23:56 UTC 2024 --- requirements-workflow.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements-workflow.txt b/requirements-workflow.txt index b3d9256a4..c4faa85e2 100644 --- a/requirements-workflow.txt +++ b/requirements-workflow.txt @@ -1,4 +1,4 @@ -ansible==9.1.0 -ansible-compat==4.1.10 -ansible-core==2.16.2 -ansible-lint==6.22.1 +ansible==11.0.0 +ansible-compat==24.10.0 +ansible-core==2.18.0 +ansible-lint==24.10.0 From 7c8d698a697f9502b917aa6de449bb2aa6fe721a Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Mon, 2 Dec 2024 18:01:29 +0100 Subject: [PATCH 02/38] Implementing SAP Note 2369910 - locale --- .../defaults/main.yml | 3 + .../meta/argument_specs.yml | 8 ++ .../tasks/sapnote/2369910.yml | 88 +++++++++++++++++++ .../tasks/sapnote/assert-2369910.yml | 48 ++++++++++ .../vars/RedHat_7.yml | 1 + .../vars/RedHat_8.0.yml | 1 + .../vars/RedHat_8.1.yml | 1 + .../vars/RedHat_8.2.yml | 1 + .../vars/RedHat_8.yml | 1 + .../vars/RedHat_9.yml | 1 + .../sap_general_preconfigure/vars/SLES_15.yml | 2 +- 11 files changed, 154 insertions(+), 1 deletion(-) create mode 100644 roles/sap_general_preconfigure/tasks/sapnote/2369910.yml create mode 100644 roles/sap_general_preconfigure/tasks/sapnote/assert-2369910.yml diff --git a/roles/sap_general_preconfigure/defaults/main.yml b/roles/sap_general_preconfigure/defaults/main.yml index 5cef8b737..8eca2d9ef 100644 --- a/roles/sap_general_preconfigure/defaults/main.yml +++ b/roles/sap_general_preconfigure/defaults/main.yml @@ -166,4 +166,7 @@ sap_general_preconfigure_domain: "{{ sap_domain | d(ansible_domain) }}" # Configuring Process Resource Limits # Example: See README.md +# 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: "" # END: Default Variables for sap_general_preconfigure diff --git a/roles/sap_general_preconfigure/meta/argument_specs.yml b/roles/sap_general_preconfigure/meta/argument_specs.yml index aaf3cf4a1..a346667b7 100644 --- a/roles/sap_general_preconfigure/meta/argument_specs.yml +++ b/roles/sap_general_preconfigure/meta/argument_specs.yml @@ -341,3 +341,11 @@ argument_specs: sap_general_preconfigure_db_group_name: 'dba' required: false type: str + + sap_general_preconfigure_default_locale: + description: + - Use this variable to specify the default system locale. + example: + sap_general_preconfigure_db_group_name: 'en_US.UTF-8' + required: false + type: str \ No newline at end of file diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2369910.yml b/roles/sap_general_preconfigure/tasks/sapnote/2369910.yml new file mode 100644 index 000000000..12412a281 --- /dev/null +++ b/roles/sap_general_preconfigure/tasks/sapnote/2369910.yml @@ -0,0 +1,88 @@ +# SPDX-License-Identifier: Apache-2.0 +--- +- name: Configure - Display SAP note number 2369910 and its version + ansible.builtin.debug: + msg: "SAP note {{ (__sap_general_preconfigure_sapnotes_versions | selectattr('number', 'match', '^2369910$') | first).number }} + (version {{ (__sap_general_preconfigure_sapnotes_versions | selectattr('number', 'match', '^2369910$') | first).version }}): Configure RHEL 7" + tags: + - always + +## STEP 3.1 -- System Language +- name: Step 3.1 - Check if English Languge is installed + tags: + - sap_general_preconfigure_2369910 + - sap_general_preconfigure_2369910_03 + block: + - name: Get list of installed locales + ansible.builtin.command: locale -a + changed_when: false + register: __sap_general_preconfigure_locales_installed + + - name: Ensure English langpacks are available on RHEL + when: locale_list.stdout_lines | select('match', '^en_') | list | length == 0 + block: + - name: Install RHEL English language packages + ansible.builtin.dnf: + name: + - langpacks-en + - glibc-langpack-en + state: present + + - name: Re-Read list of installed locales + ansible.builtin.command: locale -a + changed_when: false + register: __sap_general_preconfigure_locales_installed + + - name: Check if English locale is installed + ansible.builtin.assert: + that: + # "'en_US.UTF-8' in __sap_general_preconfigure_locales_installed.stdout" + - locale_list.stdout_lines | select('match', '^en_') | list | length > 0 + fail_msg: "No English locale installed. please install English locale" + success_msg: "English locale is installed" + +- name: Step 3.1 - Check if English Languge is Default locale + when: > + (sap_general_preconfigure_default_locale is undefined) or + (sap_general_preconfigure_default_locale | trim | length == 0) + tags: + - sap_general_preconfigure_2369910 + - sap_general_preconfigure_2369910_03 + block: + - name: Check if current default locale is English + ansible.builtin.command: grep "^LANG=en_" /etc/locale.conf + changed_when: false + register: __sap_general_preconfigure_current_default_locale + + - name: Assert that __sap_general_preconfigure_current_default_locale output is not empty + ansible.builtin.assert: + that: + - __sap_general_preconfigure_current_default_locale.stdout_lines | length > 0 + fail_msg: "No English is not set as default locale. Please set sap_general_preconfigure_default_locale variable to define an englsih default locale" + success_msg: "OK - English default locale is set" + +- name: Step 3.1 - Configure English Languge as Default locale + when: > + (sap_general_preconfigure_default_locale is defined) or + (sap_general_preconfigure_default_locale | trim | length > 0) + tags: + - sap_general_preconfigure_2369910 + - sap_general_preconfigure_2369910_03 + block: + - name: Assert that sap_general_preconfigure_default_locale starts with en + ansible.builtin.assert: + that: + - sap_general_preconfigure_default_locale.startswith('en_') + fail_msg: "No Englsih locale defined in sap_general_preconfigure_default_locale" + success_msg: "OK - English default locale is valid" + + - name: Configure English locale + ansible.builtin.lineinfile: + path: /etc/locale.conf + regexp: ^LANG= + line: "LANG={{ sap_general_preconfigure_default_locale }}" + state: present + create: true + owner: root + group: root + mode: '0644' diff --git a/roles/sap_general_preconfigure/tasks/sapnote/assert-2369910.yml b/roles/sap_general_preconfigure/tasks/sapnote/assert-2369910.yml new file mode 100644 index 000000000..eba7b6aa6 --- /dev/null +++ b/roles/sap_general_preconfigure/tasks/sapnote/assert-2369910.yml @@ -0,0 +1,48 @@ +# SPDX-License-Identifier: Apache-2.0 +--- +- name: Assert - Display SAP note number 2369910 and its version + ansible.builtin.debug: + msg: "SAP note {{ (__sap_general_preconfigure_sapnotes_versions | selectattr('number', 'match', '^2369910$') | first).number }} + (version {{ (__sap_general_preconfigure_sapnotes_versions | selectattr('number', 'match', '^2369910$') | first).version }}): Configure RHEL 7" + tags: + - always + +## STEP 3.1 -- System Language +- name: Step 3.1 - Check if English Languge is installed + tags: + - sap_general_preconfigure_2369910 + - sap_general_preconfigure_2369910_03 + block: + - name: Get list of installed locales + ansible.builtin.command: locale -a + changed_when: false + register: __sap_general_preconfigure_locales_installed + + - name: Ensure English langpacks are available on RHEL + when: locale_list.stdout_lines | select('match', '^en_') | list | length == 0 + + - name: Check if English locale is installed + ansible.builtin.assert: + that: + # "'en_US.UTF-8' in __sap_general_preconfigure_locales_installed.stdout" + - locale_list.stdout_lines | select('match', '^en_') | list | length > 0 + fail_msg: "FAIL: No English locale installed. please install English locale" + success_msg: "PASS: English locale is installed" + +- name: Step 3.1 - Check if English Languge is Default locale + tags: + - sap_general_preconfigure_2369910 + - sap_general_preconfigure_2369910_03 + block: + - name: Check if current default locale is English + ansible.builtin.command: grep "^LANG=en_" /etc/locale.conf + changed_when: false + register: __sap_general_preconfigure_current_default_locale + + - name: Assert that __sap_general_preconfigure_current_default_locale output is not empty + ansible.builtin.assert: + that: + - __sap_general_preconfigure_current_default_locale.stdout_lines | length > 0 + fail_msg: "FAIL: English is not set as default locale" + success_msg: "PASS: English default locale is set" + diff --git a/roles/sap_general_preconfigure/vars/RedHat_7.yml b/roles/sap_general_preconfigure/vars/RedHat_7.yml index 76f8dc464..93054ec9c 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_7.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_7.yml @@ -4,6 +4,7 @@ # vars file for sap_general_preconfigure __sap_general_preconfigure_sapnotes_versions: + - { number: '2369910', version: '18'} - { number: '2002167', version: '36' } - { number: '1771258', version: '6' } - { number: '1391070', version: '41' } diff --git a/roles/sap_general_preconfigure/vars/RedHat_8.0.yml b/roles/sap_general_preconfigure/vars/RedHat_8.0.yml index 0f952dcd1..10dc70fcf 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_8.0.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_8.0.yml @@ -4,6 +4,7 @@ # vars file for sap_general_preconfigure __sap_general_preconfigure_sapnotes_versions: + - { number: '2369910', version: '18'} - { number: '2772999', version: '24' } - { number: '1771258', version: '6' } diff --git a/roles/sap_general_preconfigure/vars/RedHat_8.1.yml b/roles/sap_general_preconfigure/vars/RedHat_8.1.yml index 3ffd289a8..5a68d76f5 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_8.1.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_8.1.yml @@ -4,6 +4,7 @@ # vars file for sap_general_preconfigure __sap_general_preconfigure_sapnotes_versions: + - { number: '2369910', version: '18'} - { number: '2772999', version: '24' } - { number: '1771258', version: '6' } diff --git a/roles/sap_general_preconfigure/vars/RedHat_8.2.yml b/roles/sap_general_preconfigure/vars/RedHat_8.2.yml index e47d88065..ebe492daf 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_8.2.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_8.2.yml @@ -4,6 +4,7 @@ # vars file for sap_general_preconfigure __sap_general_preconfigure_sapnotes_versions: + - { number: '2369910', version: '18'} - { number: '2772999', version: '24' } - { number: '1771258', version: '6' } diff --git a/roles/sap_general_preconfigure/vars/RedHat_8.yml b/roles/sap_general_preconfigure/vars/RedHat_8.yml index aa05e96dd..2f5a1bef5 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_8.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_8.yml @@ -4,6 +4,7 @@ # vars file for sap_general_preconfigure __sap_general_preconfigure_sapnotes_versions: + - { number: '2369910', version: '18'} - { number: '2772999', version: '24' } - { number: '1771258', version: '6' } diff --git a/roles/sap_general_preconfigure/vars/RedHat_9.yml b/roles/sap_general_preconfigure/vars/RedHat_9.yml index 9f22fefe0..1460fe620 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_9.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_9.yml @@ -4,6 +4,7 @@ # vars file for sap_general_preconfigure __sap_general_preconfigure_sapnotes_versions: + - { number: '2369910', version: '18'} - { number: '3108316', version: '2' } - { number: '1771258', version: '6' } diff --git a/roles/sap_general_preconfigure/vars/SLES_15.yml b/roles/sap_general_preconfigure/vars/SLES_15.yml index b6b7f7bf0..da250e4de 100644 --- a/roles/sap_general_preconfigure/vars/SLES_15.yml +++ b/roles/sap_general_preconfigure/vars/SLES_15.yml @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 --- __sap_general_preconfigure_sapnotes_versions: - - '' + - { number: '2369910', version: '18'} __sap_general_preconfigure_packages: - uuidd From 67b4d248dfdee11cc4063f5fa961f39cc515473b Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Tue, 3 Dec 2024 10:52:51 +0100 Subject: [PATCH 03/38] sap_general_preconfigure: fixes for initial version of locale checking and setting Fixes issue #907. Signed-off-by: Bernd Finger --- .../tasks/sapnote/2369910.yml | 73 +++++-------------- .../tasks/sapnote/assert-2369910.yml | 34 +++------ .../vars/RedHat_7.yml | 14 +++- .../vars/RedHat_8.0.yml | 5 +- .../vars/RedHat_8.1.yml | 11 ++- .../vars/RedHat_8.2.yml | 11 ++- .../vars/RedHat_8.yml | 11 ++- .../vars/RedHat_9.yml | 11 ++- 8 files changed, 87 insertions(+), 83 deletions(-) diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2369910.yml b/roles/sap_general_preconfigure/tasks/sapnote/2369910.yml index 12412a281..c6bcf6219 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2369910.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2369910.yml @@ -3,84 +3,49 @@ - name: Configure - Display SAP note number 2369910 and its version ansible.builtin.debug: msg: "SAP note {{ (__sap_general_preconfigure_sapnotes_versions | selectattr('number', 'match', '^2369910$') | first).number }} - (version {{ (__sap_general_preconfigure_sapnotes_versions | selectattr('number', 'match', '^2369910$') | first).version }}): Configure RHEL 7" + (version {{ (__sap_general_preconfigure_sapnotes_versions | selectattr('number', 'match', '^2369910$') | first).version }}): SAP Software on Linux: General Information" tags: - always -## STEP 3.1 -- System Language -- name: Step 3.1 - Check if English Languge is installed +- name: Check locales + when: sap_general_preconfigure_config_all | d(true) or sap_general_preconfigure_2369910 | d(false) tags: - sap_general_preconfigure_2369910 - - sap_general_preconfigure_2369910_03 + - sap_general_preconfigure_configure_locale block: - name: Get list of installed locales ansible.builtin.command: locale -a changed_when: false register: __sap_general_preconfigure_locales_installed - - name: Ensure English langpacks are available on RHEL - when: locale_list.stdout_lines | select('match', '^en_') | list | length == 0 - block: - - name: Install RHEL English language packages - ansible.builtin.dnf: - name: - - langpacks-en - - glibc-langpack-en - state: present - - - name: Re-Read list of installed locales - ansible.builtin.command: locale -a - changed_when: false - register: __sap_general_preconfigure_locales_installed - - - name: Check if English locale is installed + - name: Assert that an English locale is installed ansible.builtin.assert: - that: - # "'en_US.UTF-8' in __sap_general_preconfigure_locales_installed.stdout" - - locale_list.stdout_lines | select('match', '^en_') | list | length > 0 - fail_msg: "No English locale installed. please install English locale" - success_msg: "English locale is installed" + that: __sap_general_preconfigure_locales_installed.stdout_lines | select('match', '^en_') | list | length > 0 + fail_msg: "FAIL: No English locale is installed. Please install an English locale!" + success_msg: "PASS: An English locale is installed." -- name: Step 3.1 - Check if English Languge is Default locale - when: > - (sap_general_preconfigure_default_locale is undefined) or - (sap_general_preconfigure_default_locale | trim | length == 0) - tags: - - sap_general_preconfigure_2369910 - - sap_general_preconfigure_2369910_03 - block: - - name: Check if current default locale is English - ansible.builtin.command: grep "^LANG=en_" /etc/locale.conf + - name: Get the current default locale + ansible.builtin.command: awk '/^LANG=/&&/en_/{print}' /etc/locale.conf changed_when: false register: __sap_general_preconfigure_current_default_locale - - name: Assert that __sap_general_preconfigure_current_default_locale output is not empty + - name: Assert that an English locale is the default ansible.builtin.assert: - that: - - __sap_general_preconfigure_current_default_locale.stdout_lines | length > 0 - fail_msg: "No English is not set as default locale. Please set sap_general_preconfigure_default_locale variable to define an englsih default locale" - success_msg: "OK - English default locale is set" + that: __sap_general_preconfigure_current_default_locale.stdout_lines | length > 0 + fail_msg: "FAIL: English is not set as the default locale. Please define an English default locale with the 'sap_general_preconfigure_default_locale' variable!" + success_msg: "PASS: An English default locale is set." -- name: Step 3.1 - Configure English Languge as Default locale - when: > - (sap_general_preconfigure_default_locale is defined) or - (sap_general_preconfigure_default_locale | trim | length > 0) - tags: - - sap_general_preconfigure_2369910 - - sap_general_preconfigure_2369910_03 - block: - - name: Assert that sap_general_preconfigure_default_locale starts with en + - name: Assert that the role variable sap_general_preconfigure_default_locale starts with 'en_' ansible.builtin.assert: - that: - - sap_general_preconfigure_default_locale.startswith('en_') - fail_msg: "No Englsih locale defined in sap_general_preconfigure_default_locale" - success_msg: "OK - English default locale is valid" + that: sap_general_preconfigure_default_locale.startswith('en_') + fail_msg: "FAIL: No English locale is defined in variable 'sap_general_preconfigure_default_locale'!" + success_msg: "PASS: The English default locale is valid" - name: Configure English locale ansible.builtin.lineinfile: path: /etc/locale.conf regexp: ^LANG= - line: "LANG={{ sap_general_preconfigure_default_locale }}" + line: "LANG=\"{{ sap_general_preconfigure_default_locale }}\"" state: present create: true owner: root diff --git a/roles/sap_general_preconfigure/tasks/sapnote/assert-2369910.yml b/roles/sap_general_preconfigure/tasks/sapnote/assert-2369910.yml index eba7b6aa6..9f96f40c0 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/assert-2369910.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/assert-2369910.yml @@ -3,7 +3,7 @@ - name: Assert - Display SAP note number 2369910 and its version ansible.builtin.debug: msg: "SAP note {{ (__sap_general_preconfigure_sapnotes_versions | selectattr('number', 'match', '^2369910$') | first).number }} - (version {{ (__sap_general_preconfigure_sapnotes_versions | selectattr('number', 'match', '^2369910$') | first).version }}): Configure RHEL 7" + (version {{ (__sap_general_preconfigure_sapnotes_versions | selectattr('number', 'match', '^2369910$') | first).version }}): SAP Software on Linux: General Information" tags: - always @@ -18,31 +18,19 @@ changed_when: false register: __sap_general_preconfigure_locales_installed - - name: Ensure English langpacks are available on RHEL - when: locale_list.stdout_lines | select('match', '^en_') | list | length == 0 - - - name: Check if English locale is installed + - name: Assert that an English locale is installed ansible.builtin.assert: - that: - # "'en_US.UTF-8' in __sap_general_preconfigure_locales_installed.stdout" - - locale_list.stdout_lines | select('match', '^en_') | list | length > 0 - fail_msg: "FAIL: No English locale installed. please install English locale" - success_msg: "PASS: English locale is installed" + that: __sap_general_preconfigure_locales_installed.stdout_lines | select('match', '^en_') | list | length > 0 + fail_msg: "FAIL: No English locale is installed. Please install an English locale!" + success_msg: "PASS: An English locale is installed." -- name: Step 3.1 - Check if English Languge is Default locale - tags: - - sap_general_preconfigure_2369910 - - sap_general_preconfigure_2369910_03 - block: - - name: Check if current default locale is English - ansible.builtin.command: grep "^LANG=en_" /etc/locale.conf + - name: Get the current default locale + ansible.builtin.command: awk '/^LANG=/&&/en_/{print}' /etc/locale.conf changed_when: false register: __sap_general_preconfigure_current_default_locale - - name: Assert that __sap_general_preconfigure_current_default_locale output is not empty + - name: Assert that an English locale is the default ansible.builtin.assert: - that: - - __sap_general_preconfigure_current_default_locale.stdout_lines | length > 0 - fail_msg: "FAIL: English is not set as default locale" - success_msg: "PASS: English default locale is set" - + that: __sap_general_preconfigure_current_default_locale.stdout_lines | length > 0 + fail_msg: "FAIL: English is not set as the default locale. Please define an English default locale with the 'sap_general_preconfigure_default_locale' variable!" + success_msg: "PASS: An English default locale is set." diff --git a/roles/sap_general_preconfigure/vars/RedHat_7.yml b/roles/sap_general_preconfigure/vars/RedHat_7.yml index 93054ec9c..8d59e235c 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_7.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_7.yml @@ -4,7 +4,7 @@ # vars file for sap_general_preconfigure __sap_general_preconfigure_sapnotes_versions: - - { number: '2369910', version: '18'} + - { number: '2369910', version: '18' } - { number: '2002167', version: '36' } - { number: '1771258', version: '6' } - { number: '1391070', version: '41' } @@ -94,6 +94,9 @@ __sap_general_preconfigure_packages_x86_64: - compat-sap-c++-7 - compat-sap-c++-9 - compat-sap-c++-10 +# English locale packages are required as per SAP note 2369910: + - langpacks-en + - glibc-langpack-en __sap_general_preconfigure_packages_ppc64le: - uuidd @@ -104,17 +107,26 @@ __sap_general_preconfigure_packages_ppc64le: - compat-sap-c++-7 - compat-sap-c++-9 - compat-sap-c++-10 +# English locale packages are required as per SAP note 2369910: + - langpacks-en + - glibc-langpack-en __sap_general_preconfigure_packages_ppc64: - uuidd - tcsh - psmisc - compat-sap-c++-5 +# English locale packages are required as per SAP note 2369910: + - langpacks-en + - glibc-langpack-en __sap_general_preconfigure_packages_s390x: - uuidd - tcsh - psmisc +# English locale packages are required as per SAP note 2369910: + - langpacks-en + - glibc-langpack-en __sap_general_preconfigure_packages: "{{ lookup('vars', '__sap_general_preconfigure_packages_' + ansible_architecture) }}" diff --git a/roles/sap_general_preconfigure/vars/RedHat_8.0.yml b/roles/sap_general_preconfigure/vars/RedHat_8.0.yml index 10dc70fcf..d0f8fe031 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_8.0.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_8.0.yml @@ -4,7 +4,7 @@ # vars file for sap_general_preconfigure __sap_general_preconfigure_sapnotes_versions: - - { number: '2369910', version: '18'} + - { number: '2369910', version: '18' } - { number: '2772999', version: '24' } - { number: '1771258', version: '6' } @@ -48,6 +48,9 @@ __sap_general_preconfigure_packages: - psmisc - nfs-utils - bind-utils +# English locale packages are required as per SAP note 2369910: + - langpacks-en + - glibc-langpack-en __sap_general_preconfigure_required_ppc64le: - ibm-power-managed-rhel8 diff --git a/roles/sap_general_preconfigure/vars/RedHat_8.1.yml b/roles/sap_general_preconfigure/vars/RedHat_8.1.yml index 5a68d76f5..375b7e05f 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_8.1.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_8.1.yml @@ -4,7 +4,7 @@ # vars file for sap_general_preconfigure __sap_general_preconfigure_sapnotes_versions: - - { number: '2369910', version: '18'} + - { number: '2369910', version: '18' } - { number: '2772999', version: '24' } - { number: '1771258', version: '6' } @@ -50,6 +50,9 @@ __sap_general_preconfigure_packages_x86_64: - bind-utils - compat-sap-c++-9 - compat-sap-c++-10 +# English locale packages are required as per SAP note 2369910: + - langpacks-en + - glibc-langpack-en __sap_general_preconfigure_packages_ppc64le: - uuidd @@ -60,6 +63,9 @@ __sap_general_preconfigure_packages_ppc64le: - bind-utils - compat-sap-c++-9 - compat-sap-c++-10 +# English locale packages are required as per SAP note 2369910: + - langpacks-en + - glibc-langpack-en __sap_general_preconfigure_packages_s390x: - uuidd @@ -68,6 +74,9 @@ __sap_general_preconfigure_packages_s390x: - psmisc - nfs-utils - bind-utils +# English locale packages are required as per SAP note 2369910: + - langpacks-en + - glibc-langpack-en __sap_general_preconfigure_packages: "{{ lookup('vars', '__sap_general_preconfigure_packages_' + ansible_architecture) }}" diff --git a/roles/sap_general_preconfigure/vars/RedHat_8.2.yml b/roles/sap_general_preconfigure/vars/RedHat_8.2.yml index ebe492daf..bd26d320e 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_8.2.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_8.2.yml @@ -4,7 +4,7 @@ # vars file for sap_general_preconfigure __sap_general_preconfigure_sapnotes_versions: - - { number: '2369910', version: '18'} + - { number: '2369910', version: '18' } - { number: '2772999', version: '24' } - { number: '1771258', version: '6' } @@ -50,6 +50,9 @@ __sap_general_preconfigure_packages_x86_64: - bind-utils - compat-sap-c++-9 - compat-sap-c++-10 +# English locale packages are required as per SAP note 2369910: + - langpacks-en + - glibc-langpack-en __sap_general_preconfigure_packages_ppc64le: - uuidd @@ -60,6 +63,9 @@ __sap_general_preconfigure_packages_ppc64le: - bind-utils - compat-sap-c++-9 - compat-sap-c++-10 +# English locale packages are required as per SAP note 2369910: + - langpacks-en + - glibc-langpack-en __sap_general_preconfigure_packages_s390x: - uuidd @@ -68,6 +74,9 @@ __sap_general_preconfigure_packages_s390x: - psmisc - nfs-utils - bind-utils +# English locale packages are required as per SAP note 2369910: + - langpacks-en + - glibc-langpack-en __sap_general_preconfigure_packages: "{{ lookup('vars', '__sap_general_preconfigure_packages_' + ansible_architecture) }}" diff --git a/roles/sap_general_preconfigure/vars/RedHat_8.yml b/roles/sap_general_preconfigure/vars/RedHat_8.yml index 2f5a1bef5..12ee9598d 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_8.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_8.yml @@ -4,7 +4,7 @@ # vars file for sap_general_preconfigure __sap_general_preconfigure_sapnotes_versions: - - { number: '2369910', version: '18'} + - { number: '2369910', version: '18' } - { number: '2772999', version: '24' } - { number: '1771258', version: '6' } @@ -60,6 +60,9 @@ __sap_general_preconfigure_packages_x86_64: - compat-sap-c++-9 - compat-sap-c++-10 - compat-sap-c++-11 +# English locale packages are required as per SAP note 2369910: + - langpacks-en + - glibc-langpack-en __sap_general_preconfigure_packages_ppc64le: - uuidd @@ -71,6 +74,9 @@ __sap_general_preconfigure_packages_ppc64le: - compat-sap-c++-9 - compat-sap-c++-10 - compat-sap-c++-11 +# English locale packages are required as per SAP note 2369910: + - langpacks-en + - glibc-langpack-en __sap_general_preconfigure_packages_s390x: - uuidd @@ -80,6 +86,9 @@ __sap_general_preconfigure_packages_s390x: - nfs-utils - bind-utils - compat-sap-c++-10 +# English locale packages are required as per SAP note 2369910: + - langpacks-en + - glibc-langpack-en __sap_general_preconfigure_packages: "{{ lookup('vars', '__sap_general_preconfigure_packages_' + ansible_architecture) }}" diff --git a/roles/sap_general_preconfigure/vars/RedHat_9.yml b/roles/sap_general_preconfigure/vars/RedHat_9.yml index 1460fe620..a25793787 100644 --- a/roles/sap_general_preconfigure/vars/RedHat_9.yml +++ b/roles/sap_general_preconfigure/vars/RedHat_9.yml @@ -4,7 +4,7 @@ # vars file for sap_general_preconfigure __sap_general_preconfigure_sapnotes_versions: - - { number: '2369910', version: '18'} + - { number: '2369910', version: '18' } - { number: '3108316', version: '2' } - { number: '1771258', version: '6' } @@ -66,6 +66,9 @@ __sap_general_preconfigure_packages_x86_64: - tuned # package libxcrypt-compat: needed by sapstartsrv and SAP HANA on RHEL 9: - libxcrypt-compat +# English locale packages are required as per SAP note 2369910: + - langpacks-en + - glibc-langpack-en __sap_general_preconfigure_packages_ppc64le: - uuidd @@ -80,6 +83,9 @@ __sap_general_preconfigure_packages_ppc64le: - tuned # package libxcrypt-compat: needed by sapstartsrv and SAP HANA on RHEL 9: - libxcrypt-compat +# English locale packages are required as per SAP note 2369910: + - langpacks-en + - glibc-langpack-en __sap_general_preconfigure_packages_s390x: - uuidd @@ -94,6 +100,9 @@ __sap_general_preconfigure_packages_s390x: - tuned # package libxcrypt-compat: needed by sapstartsrv on RHEL 9: - libxcrypt-compat +# English locale packages are required as per SAP note 2369910: + - langpacks-en + - glibc-langpack-en __sap_general_preconfigure_packages: "{{ lookup('vars', '__sap_general_preconfigure_packages_' + ansible_architecture) }}" From bd8b57cac37ba789d1025645ac4ad9ed96cb9bde Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Thu, 5 Dec 2024 16:59:00 +0100 Subject: [PATCH 04/38] sap_ha_pacemaker_cluster:[feat] enable RHEL pre-steps for resource agent package detection --- .../tasks/RedHat/pre_steps_hana.yml | 52 +++++++++++++++++-- 1 file changed, 48 insertions(+), 4 deletions(-) diff --git a/roles/sap_ha_pacemaker_cluster/tasks/RedHat/pre_steps_hana.yml b/roles/sap_ha_pacemaker_cluster/tasks/RedHat/pre_steps_hana.yml index f4b0dd297..52aeff021 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/RedHat/pre_steps_hana.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/RedHat/pre_steps_hana.yml @@ -1,7 +1,51 @@ # SPDX-License-Identifier: Apache-2.0 --- -# Identify if SAPHanaSR-angi package is available for installation. -# SAPHanaSR-angi replaces SAPHanaSR and SAPHanaSR-ScaleOut. +# Identify if 'sap-hana-ha' package is available for installation. +# sap-hana-ha replaces resource-agents-sap-hana and resource-agents-sap-hana-scaleout. -# TODO: -# Add RedHat specific steps to identify SAPHanaSR-angi package. +- name: "SAP HA Prepare Pacemaker - Block for detection of 'SAPHanaSR-angi'" + when: (sap_ha_pacemaker_cluster_saphanasr_angi_detection | bool) + block: + + - name: "SAP HA Prepare Pacemaker - Gather installed packages facts" + ansible.builtin.package_facts: + manager: auto + + - name: "SAP HA Prepare Pacemaker - Check the availability of 'sap-hana-ha'" + ansible.builtin.command: + cmd: dnf provides sap-hana-ha + changed_when: false + register: __sap_ha_pacemaker_cluster_saphanasr_angi_check + failed_when: false + + # The provision role should not fix packages if run against systems that + # were previously installed with the conflicting packages. System state is + # unclear at this moment and the role should rather fail early. + - name: "SAP HA Prepare Pacemaker - Fail if there are package conflicts" + ansible.builtin.assert: + that: + - "'resource-agents-sap-hana' not in packages or + __sap_ha_pacemaker_cluster_saphanasr_angi_check.rc == 0" + fail_msg: | + + ERROR: Conflicting packages. + + Package available and to be installed: sap-hana-ha + + Conflicting packages are installed: + {% for finding in (packages | select('match', 'resource-agents-sap.*')) %} + - {{ finding }} + {% endfor %} + + Remove the conflicting packages to continue the setup with the + detected resource agent package. + Alternatively: Disable the package detection + (sap_ha_pacemaker_cluster_saphanasr_angi_detection = false) + to continue the setup using the installed resource agents. + + - name: "SAP HA Prepare Pacemaker - Set fact angi_available" + ansible.builtin.set_fact: + __sap_ha_pacemaker_cluster_saphanasr_angi_available: true + when: + - __sap_ha_pacemaker_cluster_saphanasr_angi_check is defined + - __sap_ha_pacemaker_cluster_saphanasr_angi_check.rc == 0 From 801303dc48b609c04bccebb25487631cf7eff64d Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Thu, 5 Dec 2024 18:11:25 +0100 Subject: [PATCH 05/38] sap_ha_pacemaker_cluster:(fix) improved task names --- roles/sap_ha_pacemaker_cluster/tasks/configure_srhook.yml | 4 ++-- .../tasks/platform/ascertain_platform_type.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/sap_ha_pacemaker_cluster/tasks/configure_srhook.yml b/roles/sap_ha_pacemaker_cluster/tasks/configure_srhook.yml index aac210639..9acfe096d 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/configure_srhook.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/configure_srhook.yml @@ -26,14 +26,14 @@ __sap_ha_pacemaker_cluster_hana_hook_chksrv: false # tkover and chksrv variables are updated if their providers are detected - - name: "SAP HA Pacemaker srHook - Set tkover true if present" + - name: "SAP HA Pacemaker srHook - Set tkover true if defined and enabled" ansible.builtin.set_fact: __sap_ha_pacemaker_cluster_hana_hook_tkover: true when: - sap_ha_pacemaker_cluster_hana_hooks | selectattr( 'provider', 'search', 'tkover', 'i') | list | length > 0 - - name: "SAP HA Pacemaker srHook - Set chksrv true if present" + - name: "SAP HA Pacemaker srHook - Set chksrv true if defined and enabled" ansible.builtin.set_fact: __sap_ha_pacemaker_cluster_hana_hook_chksrv: true when: diff --git a/roles/sap_ha_pacemaker_cluster/tasks/platform/ascertain_platform_type.yml b/roles/sap_ha_pacemaker_cluster/tasks/platform/ascertain_platform_type.yml index 4ebd242bd..4cf7b2ef2 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/platform/ascertain_platform_type.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/platform/ascertain_platform_type.yml @@ -81,14 +81,14 @@ changed_when: false when: ansible_architecture == "ppc64le" -- name: "SAP HA Prepare Pacemaker - Check if platform is IBM Power - RSCT binary check" +- name: "SAP HA Prepare Pacemaker - Check if platform is IBM Power - Fail if RSCT binary is missing" ansible.builtin.fail: msg: Please install RSCT from IBM Power Systems service and productivity tools repository when: - ansible_architecture == "ppc64le" - __sap_ha_pacemaker_cluster_power_rsct_check.stdout == "" -- name: "SAP HA Prepare Pacemaker - Check if platform is IBM Power - RSCT binary check" +- name: "SAP HA Prepare Pacemaker - Check if platform is IBM Power - Run 'ctgethscid'" ansible.builtin.shell: | /opt/rsct/bin/ctgethscid register: __sap_ha_pacemaker_cluster_power_rsct_hscid From 15eb813cc9c3a1fcd647a409bf80e0dbe2e82201 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Thu, 5 Dec 2024 18:45:17 +0100 Subject: [PATCH 06/38] sap_ha_pacemaker_cluster:(fix) correct default hanacontroller clone name as per comment in defaults/main.yml --- roles/sap_ha_pacemaker_cluster/tasks/include_vars_hana.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/sap_ha_pacemaker_cluster/tasks/include_vars_hana.yml b/roles/sap_ha_pacemaker_cluster/tasks/include_vars_hana.yml index cf7d537da..172a7d0da 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/include_vars_hana.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/include_vars_hana.yml @@ -3,7 +3,7 @@ # Detect presence of SAPHanaSR-angi package before loading HANA variables # Detection of package availability was chosen instead of OS version check. # SAPHanaSR-angi will be retrofitted to older SP repositories in future. -- name: "SAP HA Prepare Pacemaker - Detect SAPHanaSR-angi availability" +- name: "SAP HA Install Pacemaker - Run SAP HANA pre-steps" ansible.builtin.include_tasks: file: "{{ ansible_facts['os_family'] }}/pre_steps_hana.yml" when: @@ -81,7 +81,7 @@ else sap_ha_pacemaker_cluster_hanacontroller_resource_name }}" __sap_ha_pacemaker_cluster_hanacontroller_resource_clone_name: - "{{ 'mst_SAPHanaCon_' ~ __sap_ha_pacemaker_cluster_hana_sid ~ '_HDB' ~ __sap_ha_pacemaker_cluster_hana_instance_nr + "{{ 'cln_SAPHanaCon_' ~ __sap_ha_pacemaker_cluster_hana_sid ~ '_HDB' ~ __sap_ha_pacemaker_cluster_hana_instance_nr if sap_ha_pacemaker_cluster_hanacontroller_resource_clone_name | string | length == 0 else sap_ha_pacemaker_cluster_hanacontroller_resource_clone_name }}" From e910e4d3d17ff608e74744ff04a9568d489c3630 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Thu, 5 Dec 2024 18:50:38 +0100 Subject: [PATCH 07/38] sap_ha_pacemaker_cluster:(fix) order constraint use hanacontroller clone when angi is used --- .../tasks/construct_vars_vip_constraints_hana.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_vip_constraints_hana.yml b/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_vip_constraints_hana.yml index 5c1681fad..a7fabc31b 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_vip_constraints_hana.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/construct_vars_vip_constraints_hana.yml @@ -9,7 +9,9 @@ __constraint_order_vip: id: "{{ __sap_ha_pacemaker_cluster_hana_order_hana_vip_primary_name }}" resource_first: - id: "{{ __sap_ha_pacemaker_cluster_hana_resource_clone_name }}" + id: "{{ __sap_ha_pacemaker_cluster_hanacontroller_resource_clone_name + if __sap_ha_pacemaker_cluster_saphanasr_angi_available + else __sap_ha_pacemaker_cluster_hana_resource_clone_name }}" action: promote resource_then: id: "{{ __res_or_grp }}" @@ -48,7 +50,9 @@ __constraint_order_vip: id: "{{ __sap_ha_pacemaker_cluster_hana_order_hana_vip_secondary_name }}" resource_first: - id: "{{ __sap_ha_pacemaker_cluster_hana_resource_clone_name }}" + id: "{{ __sap_ha_pacemaker_cluster_hanacontroller_resource_clone_name + if __sap_ha_pacemaker_cluster_saphanasr_angi_available + else __sap_ha_pacemaker_cluster_hana_resource_clone_name }}" action: start resource_then: id: "{{ __res_or_grp }}" From 286fa45397390a7a19d514829d14dd39cbb0eb12 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Thu, 5 Dec 2024 19:09:58 +0100 Subject: [PATCH 08/38] sap_ha_pacemaker_cluster:(fix) allow user override which hooks to enable while using the OS default hook list --- .../vars/hana_scaleup_perf.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/roles/sap_ha_pacemaker_cluster/vars/hana_scaleup_perf.yml b/roles/sap_ha_pacemaker_cluster/vars/hana_scaleup_perf.yml index d471f5f73..d43b3905c 100644 --- a/roles/sap_ha_pacemaker_cluster/vars/hana_scaleup_perf.yml +++ b/roles/sap_ha_pacemaker_cluster/vars/hana_scaleup_perf.yml @@ -20,11 +20,15 @@ __sap_ha_pacemaker_cluster_hana_hook_dictionary: # Recommended srhooks are set to true only if default dictionary is populated __sap_ha_pacemaker_cluster_hana_hook_tkover: - "{{ true if lookup('ansible.builtin.vars', __sap_ha_pacemaker_cluster_hana_hook_dictionary).tkover - is defined else false }}" + "{{ true if + (lookup('ansible.builtin.vars', __sap_ha_pacemaker_cluster_hana_hook_dictionary).tkover + is defined and (sap_ha_pacemaker_cluster_hana_hook_tkover | bool)) + else false }}" __sap_ha_pacemaker_cluster_hana_hook_chksrv: - "{{ true if lookup('ansible.builtin.vars', __sap_ha_pacemaker_cluster_hana_hook_dictionary).chksrv - is defined else false }}" + "{{ true if + (lookup('ansible.builtin.vars', __sap_ha_pacemaker_cluster_hana_hook_dictionary).chksrv + is defined and (sap_ha_pacemaker_cluster_hana_hook_chksrv | bool)) + else false }}" # Combine final list of srhooks based on user input and angi availability __sap_ha_pacemaker_cluster_hana_hooks: "{{ From fd58040bc68cc1bff6ad5816fc714ed41a49fab3 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Thu, 5 Dec 2024 19:12:29 +0100 Subject: [PATCH 09/38] sap_ha_pacemaker_cluster: enable SUSE recommended hooks by OS default --- roles/sap_ha_pacemaker_cluster/vars/suse.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/sap_ha_pacemaker_cluster/vars/suse.yml b/roles/sap_ha_pacemaker_cluster/vars/suse.yml index e8fe64ee8..582e9f9da 100644 --- a/roles/sap_ha_pacemaker_cluster/vars/suse.yml +++ b/roles/sap_ha_pacemaker_cluster/vars/suse.yml @@ -132,5 +132,9 @@ __sap_ha_pacemaker_cluster_hook_hana_scaleup_perf_angi: __sap_ha_pacemaker_cluster_hook_hana_scaleout: [] __sap_ha_pacemaker_cluster_hook_hana_scaleout_angi: [] +# Enable default OS recommended hooks +sap_ha_pacemaker_cluster_hana_hook_tkover: true +sap_ha_pacemaker_cluster_hana_hook_chksrv: true + # Central Services Cluster Simple Mount: Enabled as default sap_ha_pacemaker_cluster_nwas_cs_ers_simple_mount: true From 65d4b4a47d93a2abd86604c5b4c2679f33b93f08 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Thu, 5 Dec 2024 19:14:04 +0100 Subject: [PATCH 10/38] sap_ha_pacemaker_cluster: RHEL enablement of default hooks and angi --- .../sap_ha_pacemaker_cluster/vars/redhat.yml | 48 +++++++++++++------ 1 file changed, 34 insertions(+), 14 deletions(-) diff --git a/roles/sap_ha_pacemaker_cluster/vars/redhat.yml b/roles/sap_ha_pacemaker_cluster/vars/redhat.yml index 569c91c30..d3d1a0f57 100644 --- a/roles/sap_ha_pacemaker_cluster/vars/redhat.yml +++ b/roles/sap_ha_pacemaker_cluster/vars/redhat.yml @@ -91,6 +91,8 @@ __sap_ha_pacemaker_cluster_platform_extra_packages_dict: # Dictionary with additional cluster packages for specific scenarios __sap_ha_pacemaker_cluster_sap_extra_packages_dict: + hana_angi: + - sap-hana-ha hana_scaleout: - resource-agents-sap-hana-scaleout hana_scaleup: @@ -105,13 +107,10 @@ __sap_ha_pacemaker_cluster_sap_extra_packages_dict: __sap_ha_pacemaker_cluster_resource_agents: saphanatopology: "ocf:heartbeat:SAPHanaTopology" saphana: "ocf:heartbeat:SAPHana" -# TODO: Uncomment when SAPHanaSR-angi is available on Red Hat -# saphanacontroller: "ocf:heartbeat:SAPHanaController" -# saphanafilesystem: "ocf:heartbeat:SAPHanaFilesystem" -# TODO: Uncomment when SAPStartSrv is available on Red Hat -# sapstartsrv: "ocf:heartbeat:SAPStartSrv" + saphanacontroller: "ocf:heartbeat:SAPHanaController" + saphanafilesystem: "ocf:heartbeat:SAPHanaFilesystem" + sapstartsrv: "ocf:heartbeat:SAPStartSrv" -# TODO: Uncomment when SAPHanaSR-angi is available on Red Hat __sap_ha_pacemaker_cluster_saphanasr_angi_available: false # Default SAP HANA hook parameters combined based on user decision @@ -122,18 +121,39 @@ __sap_ha_pacemaker_cluster_hook_hana_scaleup_perf: options: - name: execution_order value: 1 -# TODO: Add additional hooks + chksrv: + - provider: ChkSrv + path: /usr/share/SAPHanaSR/srHook/ + options: + - name: execution_order + value: 2 + - name: action_on_lost + value: stop + +__sap_ha_pacemaker_cluster_hook_hana_scaleup_perf_angi: + saphanasr: + - provider: HanaSR + path: /usr/share/sap-hana-ha/ + options: + - name: execution_order + value: 1 + chksrv: + - provider: ChkSrv + path: /usr/share/sap-hana-ha/ + options: + - name: execution_order + value: 2 + - name: action_on_lost + value: stop + - name: stop_timeout + value: 25 -# Placeholder dictionaries -# TODO: Define hooks when SAPHanaSR-angi is available on Red Hat -__sap_ha_pacemaker_cluster_hook_hana_scaleup_perf_angi: [] __sap_ha_pacemaker_cluster_hook_hana_scaleout: [] __sap_ha_pacemaker_cluster_hook_hana_scaleout_angi: [] -# Disabled additional hooks until they are present in dictionary above -# TODO: Remove when additional hooks are specified above. -__sap_ha_pacemaker_cluster_hana_hook_tkover: false -__sap_ha_pacemaker_cluster_hana_hook_chksrv: false +# Enable default OS recommended hooks +sap_ha_pacemaker_cluster_hana_hook_tkover: false +sap_ha_pacemaker_cluster_hana_hook_chksrv: true # Central Services Cluster Simple Mount: Enabled as default # TODO: Enable when SAPStartSrv resource agents are available on Red Hat From bb0e98257fbbfadf2903724adcb9b39497b61a51 Mon Sep 17 00:00:00 2001 From: Marcel Mamula Date: Mon, 9 Dec 2024 10:47:53 +0100 Subject: [PATCH 11/38] feat: vars loading reworked, linting yes/no cleanup --- .../tasks/RedHat/assert-installation.yml | 22 ++++---- .../generic/assert-dns-name-resolution.yml | 6 +-- .../tasks/RedHat/generic/assert-etc-hosts.yml | 24 ++++----- .../tasks/RedHat/generic/assert-firewall.yml | 6 +-- .../tasks/RedHat/generic/assert-hostname.yml | 4 +- .../assert-kernel-parameters-loop-block.yml | 8 +-- .../RedHat/generic/assert-nofile-limits.yml | 16 +++--- .../RedHat/generic/assert-nproc-limits.yml | 16 +++--- .../tasks/RedHat/generic/assert-selinux.yml | 6 +-- .../tasks/RedHat/generic/assert-tmpfs.yml | 8 +-- .../tasks/RedHat/generic/assert-uuidd.yml | 4 +- .../RedHat/generic/configure-etc-hosts.yml | 4 +- .../RedHat/generic/configure-firewall.yml | 2 +- .../generic/configure-kernel-parameters.yml | 2 +- .../RedHat/generic/configure-selinux.yml | 6 +-- .../generic/configure-systemd-tmpfiles.yml | 4 +- .../tasks/RedHat/generic/configure-tmpfs.yml | 6 +-- .../tasks/RedHat/generic/configure-uuidd.yml | 4 +- .../RedHat/generic/increase-nofile-limits.yml | 4 +- .../RedHat/generic/increase-nproc-limits.yml | 4 +- .../tasks/RedHat/installation.yml | 4 +- .../tasks/SLES/assert-installation.yml | 10 ++-- .../tasks/SLES/installation.yml | 4 +- roles/sap_general_preconfigure/tasks/main.yml | 34 ++++++++++-- .../04-assert-network-time-and-date.yml | 4 +- .../04-configure-network-time-and-date.yml | 2 +- .../04-assert-network-time-and-date.yml | 4 +- .../04-configure-network-time-and-date.yml | 2 +- .../vars/{SLES_15.yml => Suse.yml} | 7 ++- .../Suse/post_steps_nwas_abap_ascs_ers.yml | 27 ++-------- .../Suse/post_steps_nwas_java_scs_ers.yml | 27 ++-------- .../tasks/include_vars_common.yml | 25 ++++++--- .../vars/{redhat.yml => RedHat.yml} | 0 .../sap_ha_pacemaker_cluster/vars/SLES_15.yml | 20 +++++++ .../vars/{suse.yml => Suse.yml} | 3 +- roles/sap_hana_install/defaults/main.yml | 42 ++++++++------- roles/sap_hana_install/tasks/post_install.yml | 12 +++-- .../tasks/post_install/firewall.yml | 10 ++-- .../tasks/post_install/update_firewall.yml | 4 +- roles/sap_hana_install/tasks/pre_install.yml | 53 ++++++++++--------- .../tasks/pre_install/hdblcm_prepare.yml | 2 +- .../tasks/pre_install/prepare_sarfiles.yml | 4 +- .../tasks/SLES/configuration.yml | 2 +- roles/sap_hana_preconfigure/tasks/main.yml | 43 ++++++++++----- .../defaults/main.yml | 2 +- .../tasks/RedHat/assert-installation.yml | 2 +- .../tasks/RedHat/configuration.yml | 12 +++-- .../sap_netweaver_preconfigure/tasks/main.yml | 43 ++++++++++----- .../vars/SLES_15.6.yml | 23 +++++--- .../vars/SLES_15.yml | 20 ++++--- 50 files changed, 342 insertions(+), 261 deletions(-) rename roles/sap_general_preconfigure/vars/{SLES_15.yml => Suse.yml} (62%) rename roles/sap_ha_pacemaker_cluster/vars/{redhat.yml => RedHat.yml} (100%) create mode 100644 roles/sap_ha_pacemaker_cluster/vars/SLES_15.yml rename roles/sap_ha_pacemaker_cluster/vars/{suse.yml => Suse.yml} (98%) diff --git a/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml b/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml index 135c2ccd4..bba57f19d 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/assert-installation.yml @@ -49,7 +49,7 @@ - name: Assert - Get info about enabled repos ansible.builtin.shell: set -o pipefail && subscription-manager repos --list-enabled | awk '/Repo ID:/{print $NF}' register: __sap_general_preconfigure_register_enabled_repos_assert - changed_when: no + changed_when: false - name: Assert that all required repos are enabled ansible.builtin.assert: @@ -69,8 +69,8 @@ - name: Detect if and how the minor RHEL release is set ansible.builtin.shell: set -o pipefail && subscription-manager release | awk 'NF==2{printf $NF}NF!=2{print}' register: __sap_general_preconfigure_register_subscription_manager_release_assert - changed_when: no - ignore_errors: yes + changed_when: false + ignore_errors: true - name: Assert that the RHEL release is locked correctly ansible.builtin.assert: @@ -104,7 +104,7 @@ - name: Check if required RHEL 7 package groups are installed # noqa command-instead-of-shell ansible.builtin.shell: "{{ __sap_general_preconfigure_fact_yum_group_list_installed_command_assert }}" register: __sap_general_preconfigure_register_yum_group_assert - changed_when: no + changed_when: false - name: Assert that all required RHEL 7 package groups are installed ansible.builtin.assert: @@ -133,7 +133,7 @@ - name: Check if required RHEL 8 environment groups are installed # noqa command-instead-of-shell ansible.builtin.shell: "{{ __sap_general_preconfigure_fact_yum_envgroup_list_installed_command_assert }}" register: __sap_general_preconfigure_register_yum_envgroup_assert - changed_when: no + changed_when: false - name: Assert that all required RHEL 8 environment groups are installed ansible.builtin.assert: @@ -162,7 +162,7 @@ set -o pipefail && yum info installed {{ __sap_general_preconfigure_required_ppc64le | map('quote') | join(' ') }} | awk '/Name/{n=$NF}/Version/{v=$NF}/Release/{r=$NF}/Description/{printf ("%s\n", n)}' register: __sap_general_preconfigure_register_required_ppc64le_packages_assert - changed_when: no + changed_when: false when: ansible_architecture == "ppc64le" ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" @@ -223,9 +223,9 @@ with_list: "{{ __sap_general_preconfigure_min_pkgs }}" loop_control: loop_var: pkg - check_mode: no + check_mode: false register: __sap_general_preconfigure_register_minpkglist_assert - changed_when: no + changed_when: false - name: Assert that minimum required package versions are installed # If the output includes the string "is already installed" (case 2b), we have a PASS. Otherwise, it's a FAIL. @@ -237,12 +237,12 @@ loop_control: loop_var: line_item label: "" - ignore_errors: yes + ignore_errors: true - name: Report if no minimum required package version is defined for this RHEL release ansible.builtin.debug: msg: "INFO: No minimum required package version defined (variable __sap_general_preconfigure_min_pkgs)." - ignore_errors: yes + ignore_errors: true when: not __sap_general_preconfigure_min_pkgs | d([]) # Reason for noqa: The yum module appears to not support the check-update option @@ -265,7 +265,7 @@ - name: Report if checking for possible package updates is not requested ansible.builtin.debug: msg: "INFO: Not checking for possible package updates (variable sap_general_preconfigure_update)." - ignore_errors: yes + ignore_errors: true when: not sap_general_preconfigure_update - name: "Assert - Set needs-restarting command in case of RHEL 7" diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-dns-name-resolution.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-dns-name-resolution.yml index 091a538d1..c9465aa5d 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-dns-name-resolution.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-dns-name-resolution.yml @@ -7,7 +7,7 @@ fail_msg: "FAIL: The DNS domain is not configured! So variable 'sap_general_preconfigure_domain' needs to be configured!" success_msg: "PASS: The DNS domain is configured." # ignore_errors: "{{ sap_general_preconfigure_assert_ignore_errors | d(false) }}" - ignore_errors: yes + ignore_errors: true - name: Assert that variable sap_general_preconfigure_domain is set ansible.builtin.assert: @@ -25,8 +25,8 @@ - name: Check if IP address for sap_general_preconfigure_hostname.sap_general_preconfigure_domain is resolved correctly ansible.builtin.command: dig {{ sap_general_preconfigure_hostname }}.{{ sap_general_preconfigure_domain }} +short register: __sap_general_preconfigure_register_dig_short_assert - ignore_errors: yes - changed_when: no + ignore_errors: true + changed_when: false when: "'bind-utils' in ansible_facts.packages" - name: Assert that ansible_default_ipv4.address is set diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-etc-hosts.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-etc-hosts.yml index 282226b8b..cd8771b94 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-etc-hosts.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-etc-hosts.yml @@ -11,8 +11,8 @@ - name: Check if ipv4 address, FQDN, and hostname are once in /etc/hosts ansible.builtin.command: awk 'BEGIN{a=0}/^{{ sap_general_preconfigure_ip }}\s/&&/\s{{ sap_general_preconfigure_hostname }}.{{ sap_general_preconfigure_domain }}\s/&&(/\s{{ sap_general_preconfigure_hostname }}\s/||/\s{{ sap_general_preconfigure_hostname }}$/){a++}END{print a}' /etc/hosts register: __sap_general_preconfigure_register_ipv4_fqdn_sap_hostname_once_assert - ignore_errors: yes - changed_when: no + ignore_errors: true + changed_when: false - name: Assert that ipv4 address, FQDN, and hostname are once in /etc/hosts ansible.builtin.assert: @@ -25,8 +25,8 @@ - name: Count the number of sap_general_preconfigure_ip ({{ sap_general_preconfigure_ip }}) entries in /etc/hosts ansible.builtin.command: awk 'BEGIN{a=0}/^{{ sap_general_preconfigure_ip }}\s/{a++}END{print a}' /etc/hosts register: __sap_general_preconfigure_register_sap_ip_once_assert - ignore_errors: yes - changed_when: no + ignore_errors: true + changed_when: false - name: Assert that there is exactly one line containing {{ sap_general_preconfigure_ip }} in /etc/hosts ansible.builtin.assert: @@ -40,8 +40,8 @@ /\s{{ sap_general_preconfigure_hostname }}.{{ sap_general_preconfigure_domain }}\s/|| /\s{{ sap_general_preconfigure_hostname }}.{{ sap_general_preconfigure_domain }}$/{a++}END{print a}' /etc/hosts register: __sap_general_preconfigure_register_fqdn_once_assert - ignore_errors: yes - changed_when: no + ignore_errors: true + changed_when: false - name: Assert that there is just one line containing {{ sap_general_preconfigure_hostname }}.{{ sap_general_preconfigure_domain }} in /etc/hosts ansible.builtin.assert: @@ -55,8 +55,8 @@ /\s{{ sap_general_preconfigure_hostname }}\s/|| /\s{{ sap_general_preconfigure_hostname }}$/{a++}END{print a}' /etc/hosts register: __sap_general_preconfigure_register_sap_hostname_once_assert - ignore_errors: yes - changed_when: no + ignore_errors: true + changed_when: false - name: Assert that there is just one line containing {{ sap_general_preconfigure_hostname }} in /etc/hosts ansible.builtin.assert: @@ -68,8 +68,8 @@ - name: Test hostname -s ansible.builtin.shell: test "$(hostname -s)" = "$(hostname)" register: __sap_general_preconfigure_register_hostname_s_assert - ignore_errors: yes - changed_when: no + ignore_errors: true + changed_when: false - name: Assert that hostname -s matches the output of hostname ansible.builtin.assert: @@ -81,8 +81,8 @@ - name: Test hostname -f ansible.builtin.shell: test "$(hostname -f)" = "$(hostname).$(hostname -d)" register: __sap_general_preconfigure_register_hostname_f_assert - ignore_errors: yes - changed_when: no + ignore_errors: true + changed_when: false - name: Assert that hostname -f matches the output of hostname.hostname -d ansible.builtin.assert: diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-firewall.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-firewall.yml index 4b0a0de8d..ab5326cf2 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-firewall.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-firewall.yml @@ -18,9 +18,9 @@ - name: Get status of firewalld # noqa command-instead-of-module ansible.builtin.command: systemctl status firewalld register: __sap_general_preconfigure_register_firewalld_status_assert - ignore_errors: yes - changed_when: no - no_log: yes + ignore_errors: true + changed_when: false + no_log: true - name: Assert that firewalld is disabled ansible.builtin.assert: diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-hostname.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-hostname.yml index 83ff80aa2..60374bc18 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-hostname.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-hostname.yml @@ -4,8 +4,8 @@ - name: Check if hostname is set ansible.builtin.command: hostname register: __sap_general_preconfigure_register_hostname_assert - ignore_errors: yes - changed_when: no + ignore_errors: true + changed_when: false - name: Assert that the output of hostname matches the content of variable sap_general_preconfigure_hostname ansible.builtin.assert: diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-kernel-parameters-loop-block.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-kernel-parameters-loop-block.yml index a5d2fa4b5..2660929cd 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-kernel-parameters-loop-block.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-kernel-parameters-loop-block.yml @@ -6,8 +6,8 @@ - name: Get {{ line_item.name }} from {{ sap_general_preconfigure_etc_sysctl_sap_conf }} ansible.builtin.shell: awk 'BEGIN{FS="="}/{{ line_item.name }}/{gsub ("^\\s*", "", $NF); print $NF}' {{ sap_general_preconfigure_etc_sysctl_sap_conf }} register: __sap_general_preconfigure_register_sysctl_sap_conf_kernel_parameter_assert - changed_when: no - ignore_errors: yes + changed_when: false + ignore_errors: true when: __sap_general_preconfigure_register_stat_sysctl_sap_conf_assert.stat.exists - name: Assert that {{ line_item.name }} is set correctly in {{ sap_general_preconfigure_etc_sysctl_sap_conf }} @@ -23,8 +23,8 @@ - name: Get {{ line_item.name }} from sysctl ansible.builtin.shell: sysctl -n {{ line_item.name }} | awk '{gsub ("\t", " "); print}' register: __sap_general_preconfigure_register_sysctl_kernel_parameter_assert - changed_when: no - ignore_errors: yes + changed_when: false + ignore_errors: true - name: Assert that {{ line_item.name }} is set correctly as per sysctl ansible.builtin.assert: diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-nofile-limits.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-nofile-limits.yml index ef40e8843..ac4e3a5cb 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-nofile-limits.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-nofile-limits.yml @@ -4,8 +4,8 @@ - name: Check if the hard limit of nofile for group sapsys is 1048576 ansible.builtin.command: awk '!/^#/&&/sapsys/&&/nofile/&&/hard/{print $NF}' /etc/security/limits.d/99-sap.conf register: __sap_general_preconfigure_register_limits_sap_conf_nofile_hard_assert - changed_when: no - ignore_errors: yes + changed_when: false + ignore_errors: true when: - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.exists - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.isreg @@ -25,8 +25,8 @@ - name: Check if the soft limit of nofile for group sapsys is 1048576 ansible.builtin.command: awk '!/^#/&&/sapsys/&&/nofile/&&/soft/{print $NF}' /etc/security/limits.d/99-sap.conf register: __sap_general_preconfigure_register_limits_sap_conf_nofile_soft_assert - changed_when: no - ignore_errors: yes + changed_when: false + ignore_errors: true when: - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.exists - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.isreg @@ -46,8 +46,8 @@ - name: Get the hard limit of nofile for the database group ansible.builtin.command: awk '!/^#/&&/@{{ sap_general_preconfigure_db_group_name }}/&&/nofile/&&/hard/{print $NF}' /etc/security/limits.d/99-sap.conf register: __sap_general_preconfigure_register_limits_sap_conf_db_group_nofile_hard_assert - changed_when: no - ignore_errors: yes + changed_when: false + ignore_errors: true when: - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.exists - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.isreg @@ -67,8 +67,8 @@ - name: Get the soft limit of nofile for the database group ansible.builtin.command: awk '!/^#/&&/@{{ sap_general_preconfigure_db_group_name }}/&&/nofile/&&/soft/{print $NF}' /etc/security/limits.d/99-sap.conf register: __sap_general_preconfigure_register_limits_sap_conf_db_group_nofile_soft_assert - changed_when: no - ignore_errors: yes + changed_when: false + ignore_errors: true when: - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.exists - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.isreg diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-nproc-limits.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-nproc-limits.yml index db05b0f1d..703202013 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-nproc-limits.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-nproc-limits.yml @@ -4,8 +4,8 @@ - name: Check if the hard limit of nproc for group sapsys is unlimited ansible.builtin.command: awk '/sapsys/&&/nproc/&&/hard/{print $NF}' /etc/security/limits.d/99-sap.conf register: __sap_general_preconfigure_register_limits_sap_conf_nproc_hard_assert - changed_when: no - ignore_errors: yes + changed_when: false + ignore_errors: true when: - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.exists - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.isreg @@ -25,8 +25,8 @@ - name: Check if the soft limit of nproc for group sapsys is unlimited ansible.builtin.command: awk '/sapsys/&&/nproc/&&/soft/{print $NF}' /etc/security/limits.d/99-sap.conf register: __sap_general_preconfigure_register_limits_sap_conf_nproc_soft_assert - changed_when: no - ignore_errors: yes + changed_when: false + ignore_errors: true when: - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.exists - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.isreg @@ -46,8 +46,8 @@ - name: Get the hard limit of nproc for the database group ansible.builtin.command: awk '/@{{ sap_general_preconfigure_db_group_name }}/&&/nproc/&&/hard/{print $NF}' /etc/security/limits.d/99-sap.conf register: __sap_general_preconfigure_register_limits_sap_conf_db_group_nproc_hard_assert - changed_when: no - ignore_errors: yes + changed_when: false + ignore_errors: true when: - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.exists - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.isreg @@ -69,8 +69,8 @@ - name: Get the soft limit of nproc for the database group ansible.builtin.command: awk '/@{{ sap_general_preconfigure_db_group_name }}/&&/nproc/&&/soft/{print $NF}' /etc/security/limits.d/99-sap.conf register: __sap_general_preconfigure_register_limits_sap_conf_db_group_nproc_soft_assert - changed_when: no - ignore_errors: yes + changed_when: false + ignore_errors: true when: - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.exists - __sap_general_preconfigure_register_stat_limits_sap_conf_assert.stat.isreg diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml index 36e1c0c7d..b2df48f28 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-selinux.yml @@ -16,21 +16,21 @@ - name: Info about SELinux being set to 'enforcing' ansible.builtin.debug: msg: "INFO: The SELinux state has been set to 'enforcing' (variable sap_general_preconfigure_selinux_state)." - ignore_errors: yes + ignore_errors: true when: "sap_general_preconfigure_selinux_state == 'enforcing'" - name: Warn about how SELinux would be set when role is run in normal mode ansible.builtin.debug: msg: "INFO: When running in normal mode, the role will set the SELinux state to '{{ sap_general_preconfigure_selinux_state }}' (variable sap_general_preconfigure_selinux_state)." - ignore_errors: yes + ignore_errors: true when: "sap_general_preconfigure_selinux_state != 'enforcing'" - name: "Check if the permanent configuration of the SELinux state is '{{ sap_general_preconfigure_selinux_state }}'" ansible.builtin.command: awk 'BEGIN{FS="="}/^SELINUX=/{print $NF}' /etc/selinux/config register: __sap_general_preconfigure_register_selinux_conf_assert changed_when: false - ignore_errors: yes + ignore_errors: true when: __sap_general_preconfigure_register_stat_selinux_conf_assert.stat.isreg - name: "Assert that the permanent configuration of the SELinux state is set to '{{ sap_general_preconfigure_selinux_state }}'" diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-tmpfs.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-tmpfs.yml index 290c9814c..9a1588b7a 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-tmpfs.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-tmpfs.yml @@ -4,8 +4,8 @@ - name: Check the size of tmpfs ansible.builtin.command: awk '/\/dev\/shm/&&/tmpfs/{gsub ("defaults,size=", "", $4); print $4}' /etc/fstab register: __sap_general_preconfigure_register_fstab_tmpfs_size_gb_assert - ignore_errors: yes - changed_when: no + ignore_errors: true + changed_when: false - name: Assert that there is an entry for tmpfs in /etc/fstab ansible.builtin.assert: @@ -26,8 +26,8 @@ - name: Check if /dev/shm is available and has the expected size ansible.builtin.shell: df -kl /dev/shm | awk '/\/dev\/shm/&&/tmpfs/{printf ("%.0fG\n", $2/1024/1024)}' register: __sap_general_preconfigure_register_df_shm_assert - ignore_errors: yes - changed_when: no + ignore_errors: true + changed_when: false - name: Assert that the current size of tmpfs is large enough as per df output ansible.builtin.assert: diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-uuidd.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-uuidd.yml index 51e462356..360ef7908 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-uuidd.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/assert-uuidd.yml @@ -20,8 +20,8 @@ - name: Get status of uuidd.socket # noqa command-instead-of-module ansible.builtin.command: systemctl status uuidd.socket register: __sap_general_preconfigure_register_uuidd_socket_status_assert - ignore_errors: yes - changed_when: no + ignore_errors: true + changed_when: false - name: Report uuidd.socket service status ansible.builtin.debug: diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-etc-hosts.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-etc-hosts.yml index 1b517f915..306a8e043 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-etc-hosts.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-etc-hosts.yml @@ -67,7 +67,7 @@ fi register: __sap_general_preconfigure_register_duplicate_ip_check changed_when: false - ignore_errors: yes + ignore_errors: true when: not ansible_check_mode - name: Verify that variable sap_general_preconfigure_domain is set @@ -89,7 +89,7 @@ path: /etc/hosts regexp: '^{{ sap_general_preconfigure_ip }}\s' line: "{{ sap_general_preconfigure_ip }} {{ sap_general_preconfigure_hostname }}.{{ sap_general_preconfigure_domain }} {{ sap_general_preconfigure_hostname }}{{ __sap_general_preconfigure_register_sap_hostname_aliases.stdout }}" - backup: yes + backup: true when: - not ansible_check_mode - sap_general_preconfigure_domain | length > 0 diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-firewall.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-firewall.yml index 643b39689..3f31c1ff8 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-firewall.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-firewall.yml @@ -5,5 +5,5 @@ ansible.builtin.systemd: name: firewalld state: stopped - enabled: no + enabled: false when: "'firewalld' in ansible_facts.packages" diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-kernel-parameters.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-kernel-parameters.yml index f498cdce8..449899606 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-kernel-parameters.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-kernel-parameters.yml @@ -4,7 +4,7 @@ - name: Set kernel parameters ansible.builtin.lineinfile: path: "{{ sap_general_preconfigure_etc_sysctl_sap_conf }}" - create: yes + create: true mode: '0644' regexp: ^{{ line_item.name }}.* line: "{{ line_item.name }}={{ line_item.value }}" diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-selinux.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-selinux.yml index d39c1883e..595a40671 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-selinux.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-selinux.yml @@ -54,7 +54,7 @@ - name: SELinux - Examine grub entries ansible.builtin.shell: set -o pipefail && grubby --info=ALL | awk 'BEGIN{a=0;b=0}/^args/{a++}/selinux=0/{b++}END{print a, b}' register: __sap_general_preconfigure_register_grubby_info_all_selinux - check_mode: no + check_mode: false changed_when: false - name: Disable SELinux on the kernel command line, RHEL 8 and RHEL 9 @@ -70,7 +70,7 @@ - name: Disable SELinux also on the kernel command line, RHEL 8 and RHEL 9 ansible.builtin.command: grubby --args="selinux=0" --update-kernel=ALL notify: __sap_general_preconfigure_reboot_handler - changed_when: yes + changed_when: true # Reason for noqa: We need to notify a handler in another role, which is not possible from a handler in the current role - name: SELinux, disable on the kernel command line - Set the flag that reboot is needed to apply changes # noqa no-handler @@ -89,7 +89,7 @@ - name: Make sure SELinux is not disabled on the kernel command line, RHEL 8 and RHEL 9 ansible.builtin.command: grubby --remove-args="selinux" --update-kernel=ALL notify: __sap_general_preconfigure_reboot_handler - changed_when: yes + changed_when: true # Reason for noqa: We need to notify a handler in another role, which is not possible from a handler in the current role - name: SELinux, enable on the kernel command line - Set the flag that reboot is needed to apply changes # noqa no-handler diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-systemd-tmpfiles.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-systemd-tmpfiles.yml index 750d1e962..4d12fa3b2 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-systemd-tmpfiles.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-systemd-tmpfiles.yml @@ -8,7 +8,7 @@ owner: root group: root mode: '0644' - backup: yes + backup: true when: ansible_distribution_major_version != '9' - name: Copy file /etc/tmpfiles.d/sap.conf, RHEL 9 @@ -18,5 +18,5 @@ owner: root group: root mode: '0644' - backup: yes + backup: true when: ansible_distribution_major_version == '9' diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-tmpfs.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-tmpfs.yml index 1f7197b13..78fa3d264 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-tmpfs.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-tmpfs.yml @@ -14,9 +14,9 @@ - name: Get the current size of /dev/shm ansible.builtin.shell: df -hl /dev/shm | awk '/\/dev\/shm/&&/tmpfs/{gsub ("G", ""); print $2}' register: __sap_general_preconfigure_register_df_shm - ignore_errors: yes - changed_when: no - check_mode: no + ignore_errors: true + changed_when: false + check_mode: false - name: Trigger remounting if /dev/shm has not the expected size ansible.builtin.command: /bin/true diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-uuidd.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-uuidd.yml index 4e3e6cf70..8e1450176 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-uuidd.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/configure-uuidd.yml @@ -4,11 +4,11 @@ - name: Enable and start service uuidd ansible.builtin.systemd: name: uuidd - enabled: yes + enabled: true state: started - name: Enable and start service uuidd.socket ansible.builtin.systemd: name: uuidd.socket - enabled: yes + enabled: true state: started diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/increase-nofile-limits.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/increase-nofile-limits.yml index 350d64056..c83e1652c 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/increase-nofile-limits.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/increase-nofile-limits.yml @@ -8,7 +8,7 @@ for group 'sapsys' # noqa no-tabs ansible.builtin.lineinfile: path: /etc/security/limits.d/99-sap.conf - create: yes + create: true mode: "0644" regexp: '^@sapsys\s+{{ line_item }}\s+nofile\s.*' line: "@sapsys\t{{ line_item }}\tnofile\t1048576" @@ -25,7 +25,7 @@ for group '{{ sap_general_preconfigure_db_group_name }}' # noqa no-tabs ansible.builtin.lineinfile: path: /etc/security/limits.d/99-sap.conf - create: yes + create: true mode: "0644" regexp: '^@{{ sap_general_preconfigure_db_group_name }}\s+{{ line_item }}\s+nofile\s.*' line: "@{{ sap_general_preconfigure_db_group_name }}\t{{ line_item }}\tnofile\t1048576" diff --git a/roles/sap_general_preconfigure/tasks/RedHat/generic/increase-nproc-limits.yml b/roles/sap_general_preconfigure/tasks/RedHat/generic/increase-nproc-limits.yml index fa62cd8c7..85ec1e900 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/generic/increase-nproc-limits.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/generic/increase-nproc-limits.yml @@ -8,7 +8,7 @@ for group 'sapsys' # noqa no-tabs ansible.builtin.lineinfile: path: /etc/security/limits.d/99-sap.conf - create: yes + create: true mode: "0644" regexp: '^@sapsys\s+{{ line_item }}\s+nproc\s.*' line: "@sapsys\t{{ line_item }}\tnproc\tunlimited" @@ -25,7 +25,7 @@ for group '{{ sap_general_preconfigure_db_group_name }}' # noqa no-tabs ansible.builtin.lineinfile: path: /etc/security/limits.d/99-sap.conf - create: yes + create: true mode: "0644" regexp: '^@{{ sap_general_preconfigure_db_group_name }}\s+{{ line_item }}\s+nproc\s.*' line: "@{{ sap_general_preconfigure_db_group_name }}\t{{ line_item }}\tnproc\tunlimited" diff --git a/roles/sap_general_preconfigure/tasks/RedHat/installation.yml b/roles/sap_general_preconfigure/tasks/RedHat/installation.yml index 73bc2f490..2e39f2fea 100644 --- a/roles/sap_general_preconfigure/tasks/RedHat/installation.yml +++ b/roles/sap_general_preconfigure/tasks/RedHat/installation.yml @@ -208,9 +208,9 @@ with_list: "{{ __sap_general_preconfigure_min_pkgs }}" loop_control: loop_var: pkg - check_mode: no + check_mode: false register: __sap_general_preconfigure_register_minpkglist - changed_when: no + changed_when: false - name: Display the content of the minimum package list variable ansible.builtin.debug: diff --git a/roles/sap_general_preconfigure/tasks/SLES/assert-installation.yml b/roles/sap_general_preconfigure/tasks/SLES/assert-installation.yml index ecf4468e5..6aa787615 100644 --- a/roles/sap_general_preconfigure/tasks/SLES/assert-installation.yml +++ b/roles/sap_general_preconfigure/tasks/SLES/assert-installation.yml @@ -58,9 +58,9 @@ with_list: "{{ __sap_general_preconfigure_min_pkgs }}" loop_control: loop_var: pkg - check_mode: no + check_mode: false register: __sap_general_preconfigure_register_minpkglist_assert - changed_when: no + changed_when: false - name: Assert that minimum required package versions are installed # If the output includes the string "is already installed" (case 2b), we have a PASS. Otherwise, it's a FAIL. @@ -72,12 +72,12 @@ loop_control: loop_var: line_item label: "" - ignore_errors: yes + ignore_errors: true - name: Report if no minimum required package version is defined for this RHEL release ansible.builtin.debug: msg: "INFO: No minimum required package version defined (variable __sap_general_preconfigure_min_pkgs)." - ignore_errors: yes + ignore_errors: true when: not __sap_general_preconfigure_min_pkgs | d([]) # Reason for noqa: The yum module appears to not support the check-update option @@ -99,7 +99,7 @@ - name: Report if checking for possible package updates is not requested ansible.builtin.debug: msg: "INFO: Not checking for possible package updates (variable sap_general_preconfigure_update)." - ignore_errors: yes + ignore_errors: true when: not sap_general_preconfigure_update - name: "Assert - Set needs-restarting command in case of RHEL 7" diff --git a/roles/sap_general_preconfigure/tasks/SLES/installation.yml b/roles/sap_general_preconfigure/tasks/SLES/installation.yml index 047d2337c..4f9daed97 100644 --- a/roles/sap_general_preconfigure/tasks/SLES/installation.yml +++ b/roles/sap_general_preconfigure/tasks/SLES/installation.yml @@ -49,9 +49,9 @@ with_list: "{{ __sap_general_preconfigure_min_pkgs }}" loop_control: loop_var: pkg - check_mode: no + check_mode: false register: __sap_general_preconfigure_register_minpkglist - changed_when: no + changed_when: false - name: Display the content of the minimum package list variable ansible.builtin.debug: diff --git a/roles/sap_general_preconfigure/tasks/main.yml b/roles/sap_general_preconfigure/tasks/main.yml index 5682a761f..69a8ece34 100644 --- a/roles/sap_general_preconfigure/tasks/main.yml +++ b/roles/sap_general_preconfigure/tasks/main.yml @@ -7,15 +7,39 @@ tags: - always +# Load variable files in order: +# Example for SUSE Linux Enterprise Server for SAP Applications 15 SP6: +# 1. Suse.yml - Specific to OS family. +# 2. SLES_15.yml - Specific to distribution (SLES and SLES_SAP) and major release. +# 3. SLES_15.6.yml - Specific to distribution (SLES and SLES_SAP) and minor release. +# 4. SLES_SAP_15.yml - Specific to distribution SLES_SAP and major release. +# 5. SLES_SAP_15.6.yml - Specific to distribution SLES_SAP and minor release. - name: Include OS specific vars, specific - ansible.builtin.include_vars: '{{ item }}' - with_first_found: - - '{{ ansible_distribution.split("_")[0] }}_{{ ansible_distribution_version }}.yml' - - '{{ ansible_distribution.split("_")[0] }}_{{ ansible_distribution_major_version }}.yml' - - '{{ ansible_os_family }}.yml' + ansible.builtin.include_vars: "{{ __vars_file }}" + loop: + - "{{ ansible_os_family }}.yml" + - "{{ ansible_distribution }}.yml" + # Enables loading of shared vars between SLES and SLES_SAP + - >- + {{ ansible_distribution.split("_")[0] ~ '_' ~ + ansible_distribution_major_version }}.yml + - >- + {{ ansible_distribution.split("_")[0] ~ '_' ~ + ansible_distribution_version }}.yml + + - >- + {{ ansible_distribution ~ '_' ~ + ansible_distribution_major_version }}.yml + - >- + {{ ansible_distribution ~ '_' ~ + ansible_distribution_version }}.yml + vars: + __vars_file: "{{ role_path }}/vars/{{ item }}" + when: __vars_file is file tags: - always + - name: Rename user sap_preconfigure variables if found, generic ansible.builtin.set_fact: sap_general_preconfigure_config_all: "{{ (sap_preconfigure_config_all | d(sap_general_preconfigure_config_all)) | d(true) }}" diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2772999/04-assert-network-time-and-date.yml b/roles/sap_general_preconfigure/tasks/sapnote/2772999/04-assert-network-time-and-date.yml index b23b7ca93..ba3ebe2ae 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2772999/04-assert-network-time-and-date.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2772999/04-assert-network-time-and-date.yml @@ -11,8 +11,8 @@ - name: Get status of chronyd # noqa command-instead-of-module ansible.builtin.command: systemctl status chronyd register: __sap_general_preconfigure_register_chronyd_status_assert - ignore_errors: yes - changed_when: no + ignore_errors: true + changed_when: false tags: - sap_general_preconfigure_network_time_and_date diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2772999/04-configure-network-time-and-date.yml b/roles/sap_general_preconfigure/tasks/sapnote/2772999/04-configure-network-time-and-date.yml index e796f0e47..3e92e9a63 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2772999/04-configure-network-time-and-date.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2772999/04-configure-network-time-and-date.yml @@ -11,6 +11,6 @@ ansible.builtin.systemd: name: chronyd state: started - enabled: yes + enabled: true tags: - sap_general_preconfigure_network_time_and_date diff --git a/roles/sap_general_preconfigure/tasks/sapnote/3108316/04-assert-network-time-and-date.yml b/roles/sap_general_preconfigure/tasks/sapnote/3108316/04-assert-network-time-and-date.yml index 4113c99ea..e87a2d456 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/3108316/04-assert-network-time-and-date.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/3108316/04-assert-network-time-and-date.yml @@ -11,8 +11,8 @@ - name: Get status of chronyd # noqa command-instead-of-module ansible.builtin.command: systemctl status chronyd register: __sap_general_preconfigure_register_chronyd_status_assert - ignore_errors: yes - changed_when: no + ignore_errors: true + changed_when: false tags: - sap_general_preconfigure_network_time_and_date diff --git a/roles/sap_general_preconfigure/tasks/sapnote/3108316/04-configure-network-time-and-date.yml b/roles/sap_general_preconfigure/tasks/sapnote/3108316/04-configure-network-time-and-date.yml index 7bfb16d8b..d369d843d 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/3108316/04-configure-network-time-and-date.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/3108316/04-configure-network-time-and-date.yml @@ -11,6 +11,6 @@ ansible.builtin.systemd: name: chronyd state: started - enabled: yes + enabled: true tags: - sap_general_preconfigure_network_time_and_date diff --git a/roles/sap_general_preconfigure/vars/SLES_15.yml b/roles/sap_general_preconfigure/vars/Suse.yml similarity index 62% rename from roles/sap_general_preconfigure/vars/SLES_15.yml rename to roles/sap_general_preconfigure/vars/Suse.yml index b6b7f7bf0..c1bba28a1 100644 --- a/roles/sap_general_preconfigure/vars/SLES_15.yml +++ b/roles/sap_general_preconfigure/vars/Suse.yml @@ -1,5 +1,11 @@ # SPDX-License-Identifier: Apache-2.0 --- +# Variables specific to following versions: +# - SUSE Linux Enterprise Server for SAP Applications 15 +# - SUSE Linux Enterprise Server 15 +# - SUSE Linux Enterprise Server for SAP Applications 16 +# - SUSE Linux Enterprise Server 16 + __sap_general_preconfigure_sapnotes_versions: - '' @@ -9,7 +15,6 @@ __sap_general_preconfigure_packages: - psmisc - nfs-utils - bind-utils -# package hostname: needed by rhel-system-roles-sap - hostname __sap_general_preconfigure_min_pkgs: diff --git a/roles/sap_ha_pacemaker_cluster/tasks/Suse/post_steps_nwas_abap_ascs_ers.yml b/roles/sap_ha_pacemaker_cluster/tasks/Suse/post_steps_nwas_abap_ascs_ers.yml index 2d5c7d733..d1e876f99 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/Suse/post_steps_nwas_abap_ascs_ers.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/Suse/post_steps_nwas_abap_ascs_ers.yml @@ -7,19 +7,6 @@ # Following steps are similar to crmsh code in ha_cluster role, but they are # too SAP specific, so they are added here instead of there. -# Python3-pip and pexpect are required for ansible.builtin.expect -# Python installation was removed from sap_swpm role in PR#720 -- name: "SAP HA Install Pacemaker - Install required python3-pip" - ansible.builtin.package: - name: - - python3-pip - state: present - -- name: "SAP HA Install Pacemaker - Install required pip pexpect" - ansible.builtin.pip: - name: - - pexpect - - name: Block to ensure that changes are executed only once run_once: true # noqa: run_once[task] block: @@ -31,11 +18,8 @@ register: __sap_ha_pacemaker_cluster_cib_xml_backup - name: "SAP HA Install Pacemaker - Put cluster in maintenance mode" - ansible.builtin.expect: - command: crm configure property maintenance-mode=true - responses: - ".*is-managed.*": "n" - ".*already.*": "n" + ansible.builtin.command: + cmd: crm --force configure property maintenance-mode=true check_mode: false changed_when: true @@ -88,10 +72,7 @@ changed_when: true - name: "SAP HA Install Pacemaker - Disable maintenance mode" - ansible.builtin.expect: - command: crm configure property maintenance-mode=false - responses: - ".*is-managed.*": "n" - ".*already.*": "n" + ansible.builtin.command: + cmd: crm --force configure property maintenance-mode=false check_mode: false changed_when: true diff --git a/roles/sap_ha_pacemaker_cluster/tasks/Suse/post_steps_nwas_java_scs_ers.yml b/roles/sap_ha_pacemaker_cluster/tasks/Suse/post_steps_nwas_java_scs_ers.yml index 2d5c7d733..d1e876f99 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/Suse/post_steps_nwas_java_scs_ers.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/Suse/post_steps_nwas_java_scs_ers.yml @@ -7,19 +7,6 @@ # Following steps are similar to crmsh code in ha_cluster role, but they are # too SAP specific, so they are added here instead of there. -# Python3-pip and pexpect are required for ansible.builtin.expect -# Python installation was removed from sap_swpm role in PR#720 -- name: "SAP HA Install Pacemaker - Install required python3-pip" - ansible.builtin.package: - name: - - python3-pip - state: present - -- name: "SAP HA Install Pacemaker - Install required pip pexpect" - ansible.builtin.pip: - name: - - pexpect - - name: Block to ensure that changes are executed only once run_once: true # noqa: run_once[task] block: @@ -31,11 +18,8 @@ register: __sap_ha_pacemaker_cluster_cib_xml_backup - name: "SAP HA Install Pacemaker - Put cluster in maintenance mode" - ansible.builtin.expect: - command: crm configure property maintenance-mode=true - responses: - ".*is-managed.*": "n" - ".*already.*": "n" + ansible.builtin.command: + cmd: crm --force configure property maintenance-mode=true check_mode: false changed_when: true @@ -88,10 +72,7 @@ changed_when: true - name: "SAP HA Install Pacemaker - Disable maintenance mode" - ansible.builtin.expect: - command: crm configure property maintenance-mode=false - responses: - ".*is-managed.*": "n" - ".*already.*": "n" + ansible.builtin.command: + cmd: crm --force configure property maintenance-mode=false check_mode: false changed_when: true diff --git a/roles/sap_ha_pacemaker_cluster/tasks/include_vars_common.yml b/roles/sap_ha_pacemaker_cluster/tasks/include_vars_common.yml index 38b7e3aea..a122d2af7 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/include_vars_common.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/include_vars_common.yml @@ -26,19 +26,32 @@ - sap_ha_pacemaker_cluster_vip_client_interface == '' -# Include vars files based on the environment. -# Respect order for potential variable precedence. +# Load variable files in order: +# Example for SUSE Linux Enterprise Server for SAP Applications 15 SP6: +# 1. Suse.yml - Specific to OS family. +# 2. SLES_15.yml - Specific to distribution (SLES and SLES_SAP) and major release. +# 3. SLES_15.6.yml - Specific to distribution (SLES and SLES_SAP) and minor release. +# 4. SLES_SAP_15.yml - Specific to distribution SLES_SAP and major release. +# 5. SLES_SAP_15.6.yml - Specific to distribution SLES_SAP and minor release. - name: "SAP HA Prepare Pacemaker - Include environment specific variables" when: __sap_ha_pacemaker_cluster_vars_file is file ansible.builtin.include_vars: "{{ __sap_ha_pacemaker_cluster_vars_file }}" loop: - - "{{ ansible_os_family | lower }}.yml" - - "{{ ansible_distribution | lower }}.yml" + - "{{ ansible_os_family }}.yml" + - "{{ ansible_distribution }}.yml" + # Enables loading of shared vars between SLES and SLES_SAP - >- - {{ ansible_distribution | lower ~ '_' ~ + {{ ansible_distribution.split("_")[0] ~ '_' ~ ansible_distribution_major_version }}.yml - >- - {{ ansible_distribution | lower ~ '_' ~ + {{ ansible_distribution.split("_")[0] ~ '_' ~ + ansible_distribution_version }}.yml + + - >- + {{ ansible_distribution ~ '_' ~ + ansible_distribution_major_version }}.yml + - >- + {{ ansible_distribution ~ '_' ~ ansible_distribution_version }}.yml vars: __sap_ha_pacemaker_cluster_vars_file: "{{ role_path }}/vars/{{ item }}" diff --git a/roles/sap_ha_pacemaker_cluster/vars/redhat.yml b/roles/sap_ha_pacemaker_cluster/vars/RedHat.yml similarity index 100% rename from roles/sap_ha_pacemaker_cluster/vars/redhat.yml rename to roles/sap_ha_pacemaker_cluster/vars/RedHat.yml diff --git a/roles/sap_ha_pacemaker_cluster/vars/SLES_15.yml b/roles/sap_ha_pacemaker_cluster/vars/SLES_15.yml new file mode 100644 index 000000000..e97f264f1 --- /dev/null +++ b/roles/sap_ha_pacemaker_cluster/vars/SLES_15.yml @@ -0,0 +1,20 @@ +# SPDX-License-Identifier: Apache-2.0 +--- +# Variables specific to following versions: +# - SUSE Linux Enterprise Server for SAP Applications 15 +# - SUSE Linux Enterprise Server 15 + +__sap_ha_pacemaker_cluster_sap_extra_packages_dict: + minimal: + # Pattern contains all required cluster packages + - patterns-ha-ha_sles + - ClusterTools2 + hana_scaleout: + - SAPHanaSR-ScaleOut + hana_scaleup: + - SAPHanaSR + hana_angi: + - SAPHanaSR-angi + nwas: + - sap-suse-cluster-connector + - sapstartsrv-resource-agents diff --git a/roles/sap_ha_pacemaker_cluster/vars/suse.yml b/roles/sap_ha_pacemaker_cluster/vars/Suse.yml similarity index 98% rename from roles/sap_ha_pacemaker_cluster/vars/suse.yml rename to roles/sap_ha_pacemaker_cluster/vars/Suse.yml index e8fe64ee8..8e8d5f797 100644 --- a/roles/sap_ha_pacemaker_cluster/vars/suse.yml +++ b/roles/sap_ha_pacemaker_cluster/vars/Suse.yml @@ -52,8 +52,9 @@ __sap_ha_pacemaker_cluster_platform_extra_packages_dict: # Dictionary with additional cluster packages for specific scenarios __sap_ha_pacemaker_cluster_sap_extra_packages_dict: minimal: + # Pattern contains all required cluster packages + - patterns-ha-ha_sles - ClusterTools2 - - resource-agents hana_scaleout: - SAPHanaSR-ScaleOut hana_scaleup: diff --git a/roles/sap_hana_install/defaults/main.yml b/roles/sap_hana_install/defaults/main.yml index 6d4f47d38..6971068cf 100644 --- a/roles/sap_hana_install/defaults/main.yml +++ b/roles/sap_hana_install/defaults/main.yml @@ -30,19 +30,23 @@ sap_hana_install_copy_sarfiles: false # removed after extraction. sap_hana_install_keep_copied_sarfiles: false +# (RedHat specific) fapolicyd package is present on RedHat systems # For installing SAP HANA with fapolicyd support, set the following variable to `true`: sap_hana_install_use_fapolicyd: false +# (RedHat specific) fapolicyd package is present on RedHat systems # When using fapolicyd, you can set the following variable to one of `none`, `size`, `sha256`, or `ima`. Note that before setting # to `ima`, it is essential to prepare the system accordingly (e.g. boot with a different kernel parameter). See the # RHEL 9 Managing, monitoring, and updating the kernel guide for more information on this topic. sap_hana_install_fapolicyd_integrity: 'sha256' +# (RedHat specific) fapolicyd package is present on RedHat systems # When using fapolicyd, the following variable is used to define the fapolicyd rule file in which the rules for # protecting shell scripts are stored. The rule file will be created in the directory '/etc/fapolicyd/rules.d'. # Note: The mandatory file ending '.rules' will be added in the corresponding task of this role. sap_hana_install_fapolicyd_rule_file: '71-sap-shellscripts' +# (RedHat specific) fapolicyd package is present on RedHat systems # When using fapolicyd, modify the following variable to change or add the directories which contain SAP HANA executables: sap_hana_install_fapolicyd_trusted_directories: - "{{ sap_hana_install_root_path }}" @@ -50,11 +54,11 @@ sap_hana_install_fapolicyd_trusted_directories: # File name of SAPCAR*EXE in the software directory. If the variable is not set and there is more than one SAPCAR executable # in the software directory, the latest SAPCAR executable for the CPU architecture will be selected automatically. -#sap_hana_install_sapcar_filename: SAPCAR_1115-70006178.EXE +# sap_hana_install_sapcar_filename: SAPCAR_1115-70006178.EXE # List of file names of SAR files to extract. Can be set in case there are more SAR files in the software directory # than needed or desired for the HANA installation. -#sap_hana_install_sarfiles: +# sap_hana_install_sarfiles: # - SAPHOSTAGENT54_54-80004822.SAR # - IMDB_SERVER20_060_0-80002031.SAR @@ -67,7 +71,7 @@ sap_hana_install_verify_checksums: false sap_hana_install_checksum_algorithm: sha256 # In case a global checksum file is present, use the following variable to specify the full path to this file: -#sap_hana_install_global_checksum_file: "{{ sap_hana_install_software_directory }}/SHA256" +# sap_hana_install_global_checksum_file: "{{ sap_hana_install_software_directory }}/SHA256" # Set the following variable to `true` to let hdbclm verify SAR file signatures. This corresponds to the hdblcm command line # argument `--verify_signature`. @@ -126,8 +130,8 @@ sap_hana_install_modify_selinux_labels: true sap_hana_install_components: 'all' # Pass some extra arguments to hdblcm, see some examples below. -#sap_hana_install_hdblcm_extraargs: '--verify_signature' -#sap_hana_install_hdblcm_extraargs: '--ignore=check_diskspace,check_min_mem' +# sap_hana_install_hdblcm_extraargs: '--verify_signature' +# sap_hana_install_hdblcm_extraargs: '--ignore=check_diskspace,check_min_mem' # Instance details sap_hana_install_sid: @@ -154,15 +158,15 @@ sap_hana_install_groupid: # Setting master password to 'y' will use that master password for all passwords - recommended sap_hana_install_use_master_password: 'y' # Set one or more of the following password variables in your playbook or inventory. -#sap_hana_install_master_password: -#sap_hana_install_sidadm_password: -#sap_hana_install_db_system_password: -#sap_hana_install_lss_user_password: -#sap_hana_install_lss_backup_password: -#sap_hana_install_ase_user_password: -#sap_hana_install_root_password: -#sap_hana_install_sapadm_password: -#sap_hana_install_xs_org_password: +# sap_hana_install_master_password: +# sap_hana_install_sidadm_password: +# sap_hana_install_db_system_password: +# sap_hana_install_lss_user_password: +# sap_hana_install_lss_backup_password: +# sap_hana_install_ase_user_password: +# sap_hana_install_root_password: +# sap_hana_install_sapadm_password: +# sap_hana_install_xs_org_password: # Optional steps sap_hana_install_update_firewall: false @@ -191,7 +195,7 @@ sap_hana_install_firewall: state: 'enabled' } # The following variable is no longer used. Setting /etc/hosts entries is done in role sap_general_preconfigure. -#sap_hana_install_update_etchosts: true +# sap_hana_install_update_etchosts: true # Post install parameters sap_hana_install_hdbuserstore_key: 'HDB_SYSTEMDB' @@ -199,8 +203,8 @@ sap_hana_install_nw_input_location: '/tmp' # License sap_hana_install_apply_license: false -#sap_hana_install_license_path: -#sap_hana_install_license_file_name: +# sap_hana_install_license_path: +# sap_hana_install_license_file_name: # Misc @@ -220,13 +224,13 @@ sap_hana_install_create_initial_tenant: 'y' # If unset or set to 'normal', the role will leave the log_mode to 'normal', which is required for SAP HANA # System Replication. The log_mode 'overwrite' is useful for limiting cost or capacity if System Replication # is not used. -#sap_hana_install_log_mode: 'overwrite' +# sap_hana_install_log_mode: 'overwrite' # If the following variable is specified, the role will perform a scaleout installation or it will add additional # hosts to an existing HANA system. # Corresponding hdblcm parameter: addhosts # Example: -#sap_hana_install_addhosts: 'host2:role=worker,host3:role=worker:group=g02,host4:role=standby:group=g02' +# sap_hana_install_addhosts: 'host2:role=worker,host3:role=worker:group=g02,host4:role=standby:group=g02' # The hostname is set by 'hdblcm --dump_configfile_template' during the preinstall phase but can also # be set to a different value in your playbook or hostvars: diff --git a/roles/sap_hana_install/tasks/post_install.yml b/roles/sap_hana_install/tasks/post_install.yml index c276775b3..b774b3716 100644 --- a/roles/sap_hana_install/tasks/post_install.yml +++ b/roles/sap_hana_install/tasks/post_install.yml @@ -33,7 +33,7 @@ # Optional Post Install Tasks # not needed because already done in sap_general_preconfigure -#- name: SAP HANA Post Install - Update /etc/hosts +# - name: SAP HANA Post Install - Update /etc/hosts # ansible.builtin.include_tasks: post_install/update_etchosts.yml # when: # - "sap_hana_install_update_etchosts | bool" @@ -70,11 +70,13 @@ !/^ /&&/^\n")} /^ /{split ($0, b, "[\*\*\*]"); gsub (">", ""); split ($0, a, "<"); printf ("%s\{\{ sap_hana_install_%s | d(sap_hana_install_master_password) \}\}%s\n", b[1], a[2], b[4])}' {{ sap_hana_install_configfile_directory }}/{{ sap_hana_install_configfile_template_prefix }}.cfg.xml > {{ sap_hana_install_configfile_directory }}/{{ sap_hana_install_configfile_template_prefix }}.xml.j2 register: __sap_hana_install_create_jinja2_template - changed_when: no + changed_when: false - name: SAP HANA hdblcm installation check - Display the location of the remote Jinja2 template ansible.builtin.debug: - msg: "The Jinja2 template for creating the hdblcm configfile xml has been saved to '{{ sap_hana_install_configfile_directory }}/{{ sap_hana_install_configfile_template_prefix }}.xml.j2'." + msg: | + The Jinja2 template for creating the hdblcm configfile xml has been saved to + '{{ sap_hana_install_configfile_directory }}/{{ sap_hana_install_configfile_template_prefix }}.xml.j2'. - name: SAP HANA hdblcm installation check - Download the Jinja2 template ansible.builtin.fetch: @@ -155,7 +157,7 @@ args: chdir: "{{ sap_hana_install_shared_path }}/{{ sap_hana_install_sid }}/hdblcm" register: __sap_hana_install_register_install_result - changed_when: no + changed_when: false when: not ansible_check_mode - name: Configure '/usr/sap' SELinux file contexts @@ -205,7 +207,7 @@ # - ' FQDN - {{ ansible_fqdn }}' when: not ansible_check_mode -- name: SAP HANA Post Install, fapolicyd - Update config for desired integrity level and backout if validation fails +- name: SAP HANA Post Install, fapolicyd - Update config for desired integrity level and revert if validation fails when: - sap_hana_install_use_fapolicyd - '"fapolicyd" in ansible_facts.packages' diff --git a/roles/sap_hana_install/tasks/post_install/firewall.yml b/roles/sap_hana_install/tasks/post_install/firewall.yml index aa7ede64e..a213584ac 100644 --- a/roles/sap_hana_install/tasks/post_install/firewall.yml +++ b/roles/sap_hana_install/tasks/post_install/firewall.yml @@ -5,7 +5,7 @@ ansible.builtin.systemd: name: firewalld state: started - enabled: yes + enabled: true tags: sap_hana_install_configure_firewall - name: SAP HANA Post Install - Construct the argument list for 'firewall-cmd --add-port' @@ -38,12 +38,12 @@ # of the no-changed-when rule, we just set changed_when to true here. - name: SAP HANA Post Install - Enable the required ports immediately ansible.builtin.command: "{{ __sap_hana_install_fact_firewall_cmd_command }}" - changed_when: yes + changed_when: true tags: sap_hana_install_configure_firewall - name: SAP HANA Post Install - Get the current firewall configuration of the default zone ansible.builtin.command: firewall-cmd --list-all - changed_when: no + changed_when: false register: __sap_hana_install_register_current_firewall_ports tags: sap_hana_install_configure_firewall @@ -57,12 +57,12 @@ # of the no-changed-when rule, we just set changed_when to true here. - name: SAP HANA Post Install - Enable the required ports permanently ansible.builtin.command: "{{ __sap_hana_install_fact_firewall_cmd_command }} --permanent" - changed_when: yes + changed_when: true tags: sap_hana_install_configure_firewall - name: SAP HANA Post Install - Get the permanent firewall configuration of the default zone ansible.builtin.command: firewall-cmd --list-all - changed_when: no + changed_when: false register: __sap_hana_install_register_permanent_firewall_ports tags: sap_hana_install_configure_firewall diff --git a/roles/sap_hana_install/tasks/post_install/update_firewall.yml b/roles/sap_hana_install/tasks/post_install/update_firewall.yml index a00d83048..d5fca3fe3 100644 --- a/roles/sap_hana_install/tasks/post_install/update_firewall.yml +++ b/roles/sap_hana_install/tasks/post_install/update_firewall.yml @@ -6,6 +6,6 @@ ansible.posix.firewalld: zone: public port: "{{ passed_port }}/tcp" - permanent: yes - immediate: yes + permanent: true + immediate: true state: enabled diff --git a/roles/sap_hana_install/tasks/pre_install.yml b/roles/sap_hana_install/tasks/pre_install.yml index 22fef6159..d0c576020 100644 --- a/roles/sap_hana_install/tasks/pre_install.yml +++ b/roles/sap_hana_install/tasks/pre_install.yml @@ -4,16 +4,16 @@ # Password Facts ################ -#- name: SAP HANA Pre Install - Set password facts when using master password -# ansible.builtin.set_fact: -# sap_hana_install_sapadm_password: "{{ sap_hana_install_master_password }}" -# sap_hana_install_sidadm_password: "{{ sap_hana_install_master_password }}" -# sap_hana_install_db_system_password: "{{ sap_hana_install_master_password }}" -# sap_hana_install_ase_user_password: "{{ sap_hana_install_master_password }}" -# sap_hana_install_xs_org_password: "{{ sap_hana_install_master_password }}" -# sap_hana_install_lss_user_password: "{{ sap_hana_install_master_password }}" -# sap_hana_install_lss_backup_password: "{{ sap_hana_install_master_password }}" -# when: sap_hana_install_use_master_password == 'y' +# - name: SAP HANA Pre Install - Set password facts when using master password +# ansible.builtin.set_fact: +# sap_hana_install_sapadm_password: "{{ sap_hana_install_master_password }}" +# sap_hana_install_sidadm_password: "{{ sap_hana_install_master_password }}" +# sap_hana_install_db_system_password: "{{ sap_hana_install_master_password }}" +# sap_hana_install_ase_user_password: "{{ sap_hana_install_master_password }}" +# sap_hana_install_xs_org_password: "{{ sap_hana_install_master_password }}" +# sap_hana_install_lss_user_password: "{{ sap_hana_install_master_password }}" +# sap_hana_install_lss_backup_password: "{{ sap_hana_install_master_password }}" +# when: sap_hana_install_use_master_password == 'y' ################ # Handle fapolicyd @@ -23,7 +23,10 @@ ansible.builtin.package: name: fapolicyd state: present - when: sap_hana_install_use_fapolicyd + when: + - sap_hana_install_use_fapolicyd + # Ensure fapolicyd is installed only on supported systems. + - ansible_os_family == 'RedHat' tags: sap_hana_install_use_fapolicyd ################ @@ -59,9 +62,9 @@ - name: SAP HANA Pre Install - Check availability of software directory '{{ __sap_hana_install_fact_software_directory }}' ansible.builtin.stat: path: "{{ __sap_hana_install_fact_software_directory }}" - check_mode: no + check_mode: false register: __sap_hana_install_register_stat_software_directory - failed_when: no + failed_when: false - name: SAP HANA Pre Install - Assert that the software directory exists ansible.builtin.assert: @@ -69,7 +72,9 @@ fail_msg: "FAIL: The software directory '{{ __sap_hana_install_fact_software_directory }}' does not exist!" success_msg: "PASS: The software directory '{{ __sap_hana_install_fact_software_directory }}' exist." - - name: SAP HANA Pre Install - Assert directory permissions in case `sap_hana_install_software_extract_directory` is below `sap_hana_install_software_extract_directory` + - name: > + SAP HANA Pre Install - Assert directory permissions in case `sap_hana_install_software_extract_directory` + is below `sap_hana_install_software_extract_directory` when: sap_hana_install_software_extract_directory is search(sap_hana_install_software_directory) block: @@ -135,15 +140,15 @@ - name: SAP HANA Pre Install - Get info about software extract directory '{{ sap_hana_install_software_extract_directory }}' ansible.builtin.stat: path: "{{ sap_hana_install_software_extract_directory }}" - check_mode: no + check_mode: false register: __sap_hana_install_register_stat_software_extract_directory - failed_when: no + failed_when: false - name: SAP HANA Pre Install - Change ownership of software extract directory '{{ sap_hana_install_software_extract_directory }}' ansible.builtin.file: path: "{{ sap_hana_install_software_extract_directory }}" state: directory - recurse: yes + recurse: true mode: '0755' owner: root group: root @@ -154,12 +159,12 @@ ansible.builtin.wait_for: path: "{{ sap_hana_install_software_extract_directory }}/__EXTRACTION_ONGOING__" state: absent - failed_when: no + failed_when: false - name: SAP HANA Pre Install - Find directory 'SAP_HANA_DATABASE' if '{{ sap_hana_install_software_extract_directory }}' exists ansible.builtin.find: paths: "{{ sap_hana_install_software_extract_directory }}" - recurse: yes + recurse: true file_type: directory patterns: 'SAP_HANA_DATABASE' register: __sap_hana_install_register_find_directory_sap_hana_database_initial @@ -178,9 +183,9 @@ - name: SAP HANA Pre Install - Get info about '{{ __sap_hana_install_fact_hdblcm_path }}/hdblcm' if found initially ansible.builtin.stat: path: "{{ __sap_hana_install_fact_hdblcm_path + '/hdblcm' }}" - check_mode: no + check_mode: false register: __sap_hana_install_register_stat_hdblcm_initial - failed_when: no + failed_when: false - name: SAP HANA Pre Install - Assert that file 'hdblcm' is available if found initially ansible.builtin.assert: @@ -207,9 +212,9 @@ - name: SAP HANA Pre Install - Get info about '{{ __sap_hana_install_fact_hdblcm_path }}/hdblcm' ansible.builtin.stat: path: "{{ __sap_hana_install_fact_hdblcm_path + '/hdblcm' }}" - check_mode: no + check_mode: false register: __sap_hana_install_register_stat_hdblcm - failed_when: no + failed_when: false - name: SAP HANA Pre Install - Assert that file 'hdblcm' is available ansible.builtin.assert: @@ -227,7 +232,7 @@ - name: SAP HANA Pre Install - Find directory 'SAP_HANA_DATABASE' in '{{ sap_hana_install_software_extract_directory }}' ansible.builtin.find: paths: "{{ sap_hana_install_software_extract_directory }}" - recurse: yes + recurse: true file_type: directory patterns: 'SAP_HANA_DATABASE' register: __sap_hana_install_register_find_directory_sap_hana_database_addhosts diff --git a/roles/sap_hana_install/tasks/pre_install/hdblcm_prepare.yml b/roles/sap_hana_install/tasks/pre_install/hdblcm_prepare.yml index bdff8d74d..b112b322c 100644 --- a/roles/sap_hana_install/tasks/pre_install/hdblcm_prepare.yml +++ b/roles/sap_hana_install/tasks/pre_install/hdblcm_prepare.yml @@ -55,7 +55,7 @@ - name: SAP HANA hdblcm prepare - Find 'SAP_HANA_DATABASE' in '{{ sap_hana_install_software_extract_directory }}' ansible.builtin.find: paths: "{{ sap_hana_install_software_extract_directory }}" - recurse: yes + recurse: true file_type: directory patterns: 'SAP_HANA_DATABASE' register: __sap_hana_install_register_find_directory_sap_hana_database diff --git a/roles/sap_hana_install/tasks/pre_install/prepare_sarfiles.yml b/roles/sap_hana_install/tasks/pre_install/prepare_sarfiles.yml index 299e8dbbe..3131e844c 100644 --- a/roles/sap_hana_install/tasks/pre_install/prepare_sarfiles.yml +++ b/roles/sap_hana_install/tasks/pre_install/prepare_sarfiles.yml @@ -23,7 +23,7 @@ - name: SAP HANA hdblcm prepare - Find all SAR files in '{{ __sap_hana_install_fact_software_directory }}' ansible.builtin.find: paths: "{{ __sap_hana_install_fact_software_directory }}" - recurse: no + recurse: false file_type: file patterns: '*.SAR' register: __sap_hana_install_register_find_sarfiles @@ -37,7 +37,7 @@ ansible.builtin.debug: var: __sap_hana_install_fact_sarfiles -- name: Copy SAR files to final destination if 'sap_hana_install_copy_sarfiles' is 'yes' +- name: Copy SAR files to final destination if 'sap_hana_install_copy_sarfiles' is 'true' when: sap_hana_install_copy_sarfiles block: diff --git a/roles/sap_hana_preconfigure/tasks/SLES/configuration.yml b/roles/sap_hana_preconfigure/tasks/SLES/configuration.yml index 61b9b0818..c58c71598 100644 --- a/roles/sap_hana_preconfigure/tasks/SLES/configuration.yml +++ b/roles/sap_hana_preconfigure/tasks/SLES/configuration.yml @@ -1,6 +1,6 @@ # SPDX-License-Identifier: Apache-2.0 --- -- name: Takover saptune and enable +- name: Takeover saptune and enable when: __sap_hana_preconfigure_run_saptune block: - name: Ensure sapconf is stopped and disabled diff --git a/roles/sap_hana_preconfigure/tasks/main.yml b/roles/sap_hana_preconfigure/tasks/main.yml index 1708ca6aa..38404abba 100644 --- a/roles/sap_hana_preconfigure/tasks/main.yml +++ b/roles/sap_hana_preconfigure/tasks/main.yml @@ -5,21 +5,36 @@ ansible.builtin.debug: var: role_path -# Load variable file starting with actual version up to OS family. +# Load variable files in order: # Example for SUSE Linux Enterprise Server for SAP Applications 15 SP6: -# 1. SLES_SAP_15.6.yml - Specific to distribution with major and minor release. -# 2. SLES_SAP_15.yml - Specific to distribution and major release regardless of minor release. -# 3. SLES_15.6.yml - Specific to distribution family (SLES and SLES4SAP) and minor release. -# 4. SLES_15.yml - Specific to distribution. -# 5. Suse.yml - Specific to OS family. -- name: Include OS specific vars - ansible.builtin.include_vars: '{{ item }}' - with_first_found: - - '{{ ansible_distribution }}_{{ ansible_distribution_version }}.yml' - - '{{ ansible_distribution }}_{{ ansible_distribution_major_version }}.yml' - - '{{ ansible_distribution.split("_")[0] }}_{{ ansible_distribution_version }}.yml' - - '{{ ansible_distribution.split("_")[0] }}_{{ ansible_distribution_major_version }}.yml' - - '{{ ansible_os_family }}.yml' +# 1. Suse.yml - Specific to OS family. +# 2. SLES_15.yml - Specific to distribution (SLES and SLES_SAP) and major release. +# 3. SLES_15.6.yml - Specific to distribution (SLES and SLES_SAP) and minor release. +# 4. SLES_SAP_15.yml - Specific to distribution SLES_SAP and major release. +# 5. SLES_SAP_15.6.yml - Specific to distribution SLES_SAP and minor release. +- name: Include OS specific vars, specific + ansible.builtin.include_vars: "{{ __vars_file }}" + loop: + - "{{ ansible_os_family }}.yml" + - "{{ ansible_distribution }}.yml" + # Enables loading of shared vars between SLES and SLES_SAP + - >- + {{ ansible_distribution.split("_")[0] ~ '_' ~ + ansible_distribution_major_version }}.yml + - >- + {{ ansible_distribution.split("_")[0] ~ '_' ~ + ansible_distribution_version }}.yml + + - >- + {{ ansible_distribution ~ '_' ~ + ansible_distribution_major_version }}.yml + - >- + {{ ansible_distribution ~ '_' ~ + ansible_distribution_version }}.yml + vars: + __vars_file: "{{ role_path }}/vars/{{ item }}" + when: __vars_file is file + - name: Set filename prefix to empty string if role is run in normal mode ansible.builtin.set_fact: diff --git a/roles/sap_netweaver_preconfigure/defaults/main.yml b/roles/sap_netweaver_preconfigure/defaults/main.yml index 0a458da5b..1e735b950 100644 --- a/roles/sap_netweaver_preconfigure/defaults/main.yml +++ b/roles/sap_netweaver_preconfigure/defaults/main.yml @@ -5,7 +5,7 @@ # Perform an assertion run: sap_netweaver_preconfigure_assert: false -# In case of an assertion run, if set to "yes", the role will abort for any assertion error: +# In case of an assertion run, if set to "true", the role will abort for any assertion error: sap_netweaver_preconfigure_assert_ignore_errors: false sap_netweaver_preconfigure_min_swap_space_mb: '20480' diff --git a/roles/sap_netweaver_preconfigure/tasks/RedHat/assert-installation.yml b/roles/sap_netweaver_preconfigure/tasks/RedHat/assert-installation.yml index d5d271e27..2c1f8eac1 100644 --- a/roles/sap_netweaver_preconfigure/tasks/RedHat/assert-installation.yml +++ b/roles/sap_netweaver_preconfigure/tasks/RedHat/assert-installation.yml @@ -16,7 +16,7 @@ - name: Check if required packages for Adobe Document Services are installed # noqa command-instead-of-module ansible.builtin.shell: rpm -q --qf "%{NAME}.%{ARCH}\n" {{ __sap_netweaver_preconfigure_adobe_doc_services_packages | map('quote') | join(' ') }} register: __sap_netweaver_preconfigure_register_rpm_q_ads_packages - changed_when: no + changed_when: false when: sap_netweaver_preconfigure_use_adobe_doc_services | d(false) ignore_errors: "{{ sap_netweaver_preconfigure_assert_ignore_errors | d(false) }}" diff --git a/roles/sap_netweaver_preconfigure/tasks/RedHat/configuration.yml b/roles/sap_netweaver_preconfigure/tasks/RedHat/configuration.yml index 7ab03d9dd..d169bfe26 100644 --- a/roles/sap_netweaver_preconfigure/tasks/RedHat/configuration.yml +++ b/roles/sap_netweaver_preconfigure/tasks/RedHat/configuration.yml @@ -14,17 +14,19 @@ - name: Warn if not enough swap space is configured ansible.builtin.fail: - msg: "The system has only {{ ansible_swaptotal_mb }} MB of swap space configured, - which is less than the minimum required amount of {{ sap_netweaver_preconfigure_min_swap_space_mb }} MB for SAP NetWeaver!" - ignore_errors: yes + msg: | + The system has only {{ ansible_swaptotal_mb }} MB of swap space configured, + which is less than the minimum required amount of {{ sap_netweaver_preconfigure_min_swap_space_mb }} MB for SAP NetWeaver! + ignore_errors: true when: - ansible_swaptotal_mb < sap_netweaver_preconfigure_min_swap_space_mb|int - not sap_netweaver_preconfigure_fail_if_not_enough_swap_space_configured|d(true) - name: Fail if not enough swap space is configured ansible.builtin.fail: - msg: "The system has only {{ ansible_swaptotal_mb }} MB of swap space configured, - which is less than the minimum required amount of {{ sap_netweaver_preconfigure_min_swap_space_mb }} MB for SAP NetWeaver!" + msg: | + The system has only {{ ansible_swaptotal_mb }} MB of swap space configured, + which is less than the minimum required amount of {{ sap_netweaver_preconfigure_min_swap_space_mb }} MB for SAP NetWeaver! when: - ansible_swaptotal_mb < sap_netweaver_preconfigure_min_swap_space_mb|int - sap_netweaver_preconfigure_fail_if_not_enough_swap_space_configured|d(true) diff --git a/roles/sap_netweaver_preconfigure/tasks/main.yml b/roles/sap_netweaver_preconfigure/tasks/main.yml index f0a525abd..451e1c520 100644 --- a/roles/sap_netweaver_preconfigure/tasks/main.yml +++ b/roles/sap_netweaver_preconfigure/tasks/main.yml @@ -5,21 +5,36 @@ ansible.builtin.debug: var: role_path -# Load variable file starting with actual version up to OS family. +# Load variable files in order: # Example for SUSE Linux Enterprise Server for SAP Applications 15 SP6: -# 1. SLES_SAP_15.6.yml - Specific to distribution with major and minor release. -# 2. SLES_SAP_15.yml - Specific to distribution and major release regardless of minor release. -# 3. SLES_15.6.yml - Specific to distribution family (SLES and SLES4SAP) and minor release. -# 4. SLES_15.yml - Specific to distribution. -# 5. Suse.yml - Specific to OS family. -- name: Include OS specific vars - ansible.builtin.include_vars: '{{ item }}' - with_first_found: - - '{{ ansible_distribution }}_{{ ansible_distribution_version }}.yml' - - '{{ ansible_distribution }}_{{ ansible_distribution_major_version }}.yml' - - '{{ ansible_distribution.split("_")[0] }}_{{ ansible_distribution_version }}.yml' - - '{{ ansible_distribution.split("_")[0] }}_{{ ansible_distribution_major_version }}.yml' - - '{{ ansible_os_family }}.yml' +# 1. Suse.yml - Specific to OS family. +# 2. SLES_15.yml - Specific to distribution (SLES and SLES_SAP) and major release. +# 3. SLES_15.6.yml - Specific to distribution (SLES and SLES_SAP) and minor release. +# 4. SLES_SAP_15.yml - Specific to distribution SLES_SAP and major release. +# 5. SLES_SAP_15.6.yml - Specific to distribution SLES_SAP and minor release. +- name: Include OS specific vars, specific + ansible.builtin.include_vars: "{{ __vars_file }}" + loop: + - "{{ ansible_os_family }}.yml" + - "{{ ansible_distribution }}.yml" + # Enables loading of shared vars between SLES and SLES_SAP + - >- + {{ ansible_distribution.split("_")[0] ~ '_' ~ + ansible_distribution_major_version }}.yml + - >- + {{ ansible_distribution.split("_")[0] ~ '_' ~ + ansible_distribution_version }}.yml + + - >- + {{ ansible_distribution ~ '_' ~ + ansible_distribution_major_version }}.yml + - >- + {{ ansible_distribution ~ '_' ~ + ansible_distribution_version }}.yml + vars: + __vars_file: "{{ role_path }}/vars/{{ item }}" + when: __vars_file is file + - name: Set filename prefix to empty string if role is run in normal mode ansible.builtin.set_fact: diff --git a/roles/sap_netweaver_preconfigure/vars/SLES_15.6.yml b/roles/sap_netweaver_preconfigure/vars/SLES_15.6.yml index 34ad9619a..42032de73 100644 --- a/roles/sap_netweaver_preconfigure/vars/SLES_15.6.yml +++ b/roles/sap_netweaver_preconfigure/vars/SLES_15.6.yml @@ -8,28 +8,35 @@ __sap_netweaver_preconfigure_sapnotes: - "1275776" __sap_netweaver_preconfigure_packages: + # Mandatory packages + - tcsh + - acl + - insserv-compat + - system-user-uuidd + - uuidd + # gcc packages - libstdc++6 - libatomic1 - libgcc_s1 - libltdl7 - - insserv-compat + # System monitoring + - sysstat - cpupower - - hicolor-icon-theme - - libcpupower1 # libcpupower0 was removed in SP6 + - libcpupower1 - libsensors4 + # Patterns - patterns-base-basesystem - patterns-server-enterprise-sap_server - patterns-yast-yast2_basis + # Additional packages - procmail - - sysstat - - system-user-uuidd - - uuidd + # Not needed but kept for compatibility + - hicolor-icon-theme - yast2-auth-client - yast2-auth-server - yast2-theme - yast2-vpn - - tcsh - - acl + # SLES_SAP is using saptune, but SLES is using sapconf. # Default value true runs saptune, but installation.yml auto-detects base product and adjusts. diff --git a/roles/sap_netweaver_preconfigure/vars/SLES_15.yml b/roles/sap_netweaver_preconfigure/vars/SLES_15.yml index b6f0bacc6..cc632e33f 100644 --- a/roles/sap_netweaver_preconfigure/vars/SLES_15.yml +++ b/roles/sap_netweaver_preconfigure/vars/SLES_15.yml @@ -8,28 +8,34 @@ __sap_netweaver_preconfigure_sapnotes: - "1275776" __sap_netweaver_preconfigure_packages: + # Mandatory packages + - tcsh + - acl + - insserv-compat + - system-user-uuidd + - uuidd + # gcc packages - libstdc++6 - libatomic1 - libgcc_s1 - libltdl7 - - insserv-compat + # System monitoring + - sysstat - cpupower - - hicolor-icon-theme - libcpupower0 - libsensors4 + # Patterns - patterns-base-basesystem - patterns-server-enterprise-sap_server - patterns-yast-yast2_basis + # Additional packages - procmail - - sysstat - - system-user-uuidd - - uuidd + # Not needed but kept for compatibility + - hicolor-icon-theme - yast2-auth-client - yast2-auth-server - yast2-theme - yast2-vpn - - tcsh - - acl # SLES_SAP is using saptune, but SLES is using sapconf. # Default value true runs saptune, but installation.yml auto-detects base product and adjusts. From a3fc8dc3f43468d296b808a428eb92d9f07609db Mon Sep 17 00:00:00 2001 From: Marcel Mamula Date: Mon, 9 Dec 2024 13:34:19 +0100 Subject: [PATCH 12/38] fix: add omit for duplicate var combinations --- roles/sap_general_preconfigure/tasks/main.yml | 25 ++++++--------- .../tasks/include_vars_common.yml | 31 ++++++++----------- roles/sap_hana_preconfigure/tasks/main.yml | 25 ++++++--------- .../defaults/main.yml | 2 +- .../sap_netweaver_preconfigure/tasks/main.yml | 27 +++++++--------- 5 files changed, 46 insertions(+), 64 deletions(-) diff --git a/roles/sap_general_preconfigure/tasks/main.yml b/roles/sap_general_preconfigure/tasks/main.yml index 69a8ece34..3a6fcb94e 100644 --- a/roles/sap_general_preconfigure/tasks/main.yml +++ b/roles/sap_general_preconfigure/tasks/main.yml @@ -18,23 +18,18 @@ ansible.builtin.include_vars: "{{ __vars_file }}" loop: - "{{ ansible_os_family }}.yml" - - "{{ ansible_distribution }}.yml" - # Enables loading of shared vars between SLES and SLES_SAP - - >- - {{ ansible_distribution.split("_")[0] ~ '_' ~ - ansible_distribution_major_version }}.yml - - >- - {{ ansible_distribution.split("_")[0] ~ '_' ~ - ansible_distribution_version }}.yml - - - >- - {{ ansible_distribution ~ '_' ~ - ansible_distribution_major_version }}.yml - - >- - {{ ansible_distribution ~ '_' ~ - ansible_distribution_version }}.yml + - "{{ ansible_distribution ~ '.yml' if ansible_distribution != ansible_os_family else omit }}" + - "{{ __distribution_major_split ~ '.yml' if __distribution_major_split != __distribution_major else omit }}" + - "{{ __distribution_minor_split ~ '.yml' if __distribution_minor_split != __distribution_minor else omit }}" + - "{{ __distribution_major }}.yml" + - "{{ __distribution_minor }}.yml" vars: __vars_file: "{{ role_path }}/vars/{{ item }}" + __distribution_major: "{{ ansible_distribution ~ '_' ~ ansible_distribution_major_version }}" + __distribution_minor: "{{ ansible_distribution ~ '_' ~ ansible_distribution_version }}" + # Enables loading of shared vars between SLES and SLES_SAP + __distribution_major_split: "{{ ansible_distribution.split('_')[0] ~ '_' ~ ansible_distribution_major_version }}" + __distribution_minor_split: "{{ ansible_distribution.split('_')[0] ~ '_' ~ ansible_distribution_version }}" when: __vars_file is file tags: - always diff --git a/roles/sap_ha_pacemaker_cluster/tasks/include_vars_common.yml b/roles/sap_ha_pacemaker_cluster/tasks/include_vars_common.yml index a122d2af7..172022f2a 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/include_vars_common.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/include_vars_common.yml @@ -34,24 +34,19 @@ # 4. SLES_SAP_15.yml - Specific to distribution SLES_SAP and major release. # 5. SLES_SAP_15.6.yml - Specific to distribution SLES_SAP and minor release. - name: "SAP HA Prepare Pacemaker - Include environment specific variables" - when: __sap_ha_pacemaker_cluster_vars_file is file - ansible.builtin.include_vars: "{{ __sap_ha_pacemaker_cluster_vars_file }}" + ansible.builtin.include_vars: "{{ __vars_file }}" loop: - "{{ ansible_os_family }}.yml" - - "{{ ansible_distribution }}.yml" - # Enables loading of shared vars between SLES and SLES_SAP - - >- - {{ ansible_distribution.split("_")[0] ~ '_' ~ - ansible_distribution_major_version }}.yml - - >- - {{ ansible_distribution.split("_")[0] ~ '_' ~ - ansible_distribution_version }}.yml - - - >- - {{ ansible_distribution ~ '_' ~ - ansible_distribution_major_version }}.yml - - >- - {{ ansible_distribution ~ '_' ~ - ansible_distribution_version }}.yml + - "{{ ansible_distribution ~ '.yml' if ansible_distribution != ansible_os_family else omit }}" + - "{{ __distribution_major_split ~ '.yml' if __distribution_major_split != __distribution_major else omit }}" + - "{{ __distribution_minor_split ~ '.yml' if __distribution_minor_split != __distribution_minor else omit }}" + - "{{ __distribution_major }}.yml" + - "{{ __distribution_minor }}.yml" vars: - __sap_ha_pacemaker_cluster_vars_file: "{{ role_path }}/vars/{{ item }}" + __vars_file: "{{ role_path }}/vars/{{ item }}" + __distribution_major: "{{ ansible_distribution ~ '_' ~ ansible_distribution_major_version }}" + __distribution_minor: "{{ ansible_distribution ~ '_' ~ ansible_distribution_version }}" + # Enables loading of shared vars between SLES and SLES_SAP + __distribution_major_split: "{{ ansible_distribution.split('_')[0] ~ '_' ~ ansible_distribution_major_version }}" + __distribution_minor_split: "{{ ansible_distribution.split('_')[0] ~ '_' ~ ansible_distribution_version }}" + when: __vars_file is file diff --git a/roles/sap_hana_preconfigure/tasks/main.yml b/roles/sap_hana_preconfigure/tasks/main.yml index 38404abba..07bae9819 100644 --- a/roles/sap_hana_preconfigure/tasks/main.yml +++ b/roles/sap_hana_preconfigure/tasks/main.yml @@ -16,23 +16,18 @@ ansible.builtin.include_vars: "{{ __vars_file }}" loop: - "{{ ansible_os_family }}.yml" - - "{{ ansible_distribution }}.yml" - # Enables loading of shared vars between SLES and SLES_SAP - - >- - {{ ansible_distribution.split("_")[0] ~ '_' ~ - ansible_distribution_major_version }}.yml - - >- - {{ ansible_distribution.split("_")[0] ~ '_' ~ - ansible_distribution_version }}.yml - - - >- - {{ ansible_distribution ~ '_' ~ - ansible_distribution_major_version }}.yml - - >- - {{ ansible_distribution ~ '_' ~ - ansible_distribution_version }}.yml + - "{{ ansible_distribution ~ '.yml' if ansible_distribution != ansible_os_family else omit }}" + - "{{ __distribution_major_split ~ '.yml' if __distribution_major_split != __distribution_major else omit }}" + - "{{ __distribution_minor_split ~ '.yml' if __distribution_minor_split != __distribution_minor else omit }}" + - "{{ __distribution_major }}.yml" + - "{{ __distribution_minor }}.yml" vars: __vars_file: "{{ role_path }}/vars/{{ item }}" + __distribution_major: "{{ ansible_distribution ~ '_' ~ ansible_distribution_major_version }}" + __distribution_minor: "{{ ansible_distribution ~ '_' ~ ansible_distribution_version }}" + # Enables loading of shared vars between SLES and SLES_SAP + __distribution_major_split: "{{ ansible_distribution.split('_')[0] ~ '_' ~ ansible_distribution_major_version }}" + __distribution_minor_split: "{{ ansible_distribution.split('_')[0] ~ '_' ~ ansible_distribution_version }}" when: __vars_file is file diff --git a/roles/sap_netweaver_preconfigure/defaults/main.yml b/roles/sap_netweaver_preconfigure/defaults/main.yml index 1e735b950..a1bea12c0 100644 --- a/roles/sap_netweaver_preconfigure/defaults/main.yml +++ b/roles/sap_netweaver_preconfigure/defaults/main.yml @@ -5,7 +5,7 @@ # Perform an assertion run: sap_netweaver_preconfigure_assert: false -# In case of an assertion run, if set to "true", the role will abort for any assertion error: +# In case of an assertion run, if set to true, the role will abort for any assertion error: sap_netweaver_preconfigure_assert_ignore_errors: false sap_netweaver_preconfigure_min_swap_space_mb: '20480' diff --git a/roles/sap_netweaver_preconfigure/tasks/main.yml b/roles/sap_netweaver_preconfigure/tasks/main.yml index 451e1c520..702e51066 100644 --- a/roles/sap_netweaver_preconfigure/tasks/main.yml +++ b/roles/sap_netweaver_preconfigure/tasks/main.yml @@ -16,24 +16,21 @@ ansible.builtin.include_vars: "{{ __vars_file }}" loop: - "{{ ansible_os_family }}.yml" - - "{{ ansible_distribution }}.yml" - # Enables loading of shared vars between SLES and SLES_SAP - - >- - {{ ansible_distribution.split("_")[0] ~ '_' ~ - ansible_distribution_major_version }}.yml - - >- - {{ ansible_distribution.split("_")[0] ~ '_' ~ - ansible_distribution_version }}.yml - - - >- - {{ ansible_distribution ~ '_' ~ - ansible_distribution_major_version }}.yml - - >- - {{ ansible_distribution ~ '_' ~ - ansible_distribution_version }}.yml + - "{{ ansible_distribution ~ '.yml' if ansible_distribution != ansible_os_family else omit }}" + - "{{ __distribution_major_split ~ '.yml' if __distribution_major_split != __distribution_major else omit }}" + - "{{ __distribution_minor_split ~ '.yml' if __distribution_minor_split != __distribution_minor else omit }}" + - "{{ __distribution_major }}.yml" + - "{{ __distribution_minor }}.yml" vars: __vars_file: "{{ role_path }}/vars/{{ item }}" + __distribution_major: "{{ ansible_distribution ~ '_' ~ ansible_distribution_major_version }}" + __distribution_minor: "{{ ansible_distribution ~ '_' ~ ansible_distribution_version }}" + # Enables loading of shared vars between SLES and SLES_SAP + __distribution_major_split: "{{ ansible_distribution.split('_')[0] ~ '_' ~ ansible_distribution_major_version }}" + __distribution_minor_split: "{{ ansible_distribution.split('_')[0] ~ '_' ~ ansible_distribution_version }}" when: __vars_file is file + tags: + - always - name: Set filename prefix to empty string if role is run in normal mode From 4916c2aeeef1c6b3bad547d294e448dd44eb768a Mon Sep 17 00:00:00 2001 From: Marcel Mamula Date: Mon, 9 Dec 2024 15:12:31 +0100 Subject: [PATCH 13/38] fix: update example for var load order --- roles/sap_general_preconfigure/tasks/main.yml | 9 ++++----- .../tasks/include_vars_common.yml | 7 +++---- roles/sap_hana_preconfigure/tasks/main.yml | 7 +++---- roles/sap_netweaver_preconfigure/tasks/main.yml | 7 +++---- 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/roles/sap_general_preconfigure/tasks/main.yml b/roles/sap_general_preconfigure/tasks/main.yml index 3a6fcb94e..3abafab7f 100644 --- a/roles/sap_general_preconfigure/tasks/main.yml +++ b/roles/sap_general_preconfigure/tasks/main.yml @@ -7,11 +7,10 @@ tags: - always -# Load variable files in order: -# Example for SUSE Linux Enterprise Server for SAP Applications 15 SP6: -# 1. Suse.yml - Specific to OS family. -# 2. SLES_15.yml - Specific to distribution (SLES and SLES_SAP) and major release. -# 3. SLES_15.6.yml - Specific to distribution (SLES and SLES_SAP) and minor release. +# Example of files loading order: +# 1. Suse.yml / RedHat.yml - Specific to OS family. +# 2. SLES_15.yml / RedHat_9.yml - Specific to distribution (SLES, SLES_SAP or RedHat) and major release. +# 3. SLES_15.6.yml / RedHat_9.2 - Specific to distribution (SLES, SLES_SAP or RedHat) and minor release. # 4. SLES_SAP_15.yml - Specific to distribution SLES_SAP and major release. # 5. SLES_SAP_15.6.yml - Specific to distribution SLES_SAP and minor release. - name: Include OS specific vars, specific diff --git a/roles/sap_ha_pacemaker_cluster/tasks/include_vars_common.yml b/roles/sap_ha_pacemaker_cluster/tasks/include_vars_common.yml index 172022f2a..0d1d1e6f4 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/include_vars_common.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/include_vars_common.yml @@ -27,10 +27,9 @@ # Load variable files in order: -# Example for SUSE Linux Enterprise Server for SAP Applications 15 SP6: -# 1. Suse.yml - Specific to OS family. -# 2. SLES_15.yml - Specific to distribution (SLES and SLES_SAP) and major release. -# 3. SLES_15.6.yml - Specific to distribution (SLES and SLES_SAP) and minor release. +# 1. Suse.yml / RedHat.yml - Specific to OS family. +# 2. SLES_15.yml / RedHat_9.yml - Specific to distribution (SLES, SLES_SAP or RedHat) and major release. +# 3. SLES_15.6.yml / RedHat_9.2 - Specific to distribution (SLES, SLES_SAP or RedHat) and minor release. # 4. SLES_SAP_15.yml - Specific to distribution SLES_SAP and major release. # 5. SLES_SAP_15.6.yml - Specific to distribution SLES_SAP and minor release. - name: "SAP HA Prepare Pacemaker - Include environment specific variables" diff --git a/roles/sap_hana_preconfigure/tasks/main.yml b/roles/sap_hana_preconfigure/tasks/main.yml index 07bae9819..91c6dd51e 100644 --- a/roles/sap_hana_preconfigure/tasks/main.yml +++ b/roles/sap_hana_preconfigure/tasks/main.yml @@ -6,10 +6,9 @@ var: role_path # Load variable files in order: -# Example for SUSE Linux Enterprise Server for SAP Applications 15 SP6: -# 1. Suse.yml - Specific to OS family. -# 2. SLES_15.yml - Specific to distribution (SLES and SLES_SAP) and major release. -# 3. SLES_15.6.yml - Specific to distribution (SLES and SLES_SAP) and minor release. +# 1. Suse.yml / RedHat.yml - Specific to OS family. +# 2. SLES_15.yml / RedHat_9.yml - Specific to distribution (SLES, SLES_SAP or RedHat) and major release. +# 3. SLES_15.6.yml / RedHat_9.2 - Specific to distribution (SLES, SLES_SAP or RedHat) and minor release. # 4. SLES_SAP_15.yml - Specific to distribution SLES_SAP and major release. # 5. SLES_SAP_15.6.yml - Specific to distribution SLES_SAP and minor release. - name: Include OS specific vars, specific diff --git a/roles/sap_netweaver_preconfigure/tasks/main.yml b/roles/sap_netweaver_preconfigure/tasks/main.yml index 702e51066..d8d72e325 100644 --- a/roles/sap_netweaver_preconfigure/tasks/main.yml +++ b/roles/sap_netweaver_preconfigure/tasks/main.yml @@ -6,10 +6,9 @@ var: role_path # Load variable files in order: -# Example for SUSE Linux Enterprise Server for SAP Applications 15 SP6: -# 1. Suse.yml - Specific to OS family. -# 2. SLES_15.yml - Specific to distribution (SLES and SLES_SAP) and major release. -# 3. SLES_15.6.yml - Specific to distribution (SLES and SLES_SAP) and minor release. +# 1. Suse.yml / RedHat.yml - Specific to OS family. +# 2. SLES_15.yml / RedHat_9.yml - Specific to distribution (SLES, SLES_SAP or RedHat) and major release. +# 3. SLES_15.6.yml / RedHat_9.2 - Specific to distribution (SLES, SLES_SAP or RedHat) and minor release. # 4. SLES_SAP_15.yml - Specific to distribution SLES_SAP and major release. # 5. SLES_SAP_15.6.yml - Specific to distribution SLES_SAP and minor release. - name: Include OS specific vars, specific From 86807960c685f51e72025a98a62f6bbe07f05f99 Mon Sep 17 00:00:00 2001 From: Marcel Mamula Date: Mon, 9 Dec 2024 16:17:59 +0100 Subject: [PATCH 14/38] fix: replace omit with dynamic j2 list --- roles/sap_general_preconfigure/tasks/main.yml | 19 ++++++++++++------- .../tasks/include_vars_common.yml | 19 ++++++++++++------- roles/sap_hana_preconfigure/tasks/main.yml | 19 ++++++++++++------- .../sap_netweaver_preconfigure/tasks/main.yml | 19 ++++++++++++------- 4 files changed, 48 insertions(+), 28 deletions(-) diff --git a/roles/sap_general_preconfigure/tasks/main.yml b/roles/sap_general_preconfigure/tasks/main.yml index 3abafab7f..0cdd514c2 100644 --- a/roles/sap_general_preconfigure/tasks/main.yml +++ b/roles/sap_general_preconfigure/tasks/main.yml @@ -15,13 +15,7 @@ # 5. SLES_SAP_15.6.yml - Specific to distribution SLES_SAP and minor release. - name: Include OS specific vars, specific ansible.builtin.include_vars: "{{ __vars_file }}" - loop: - - "{{ ansible_os_family }}.yml" - - "{{ ansible_distribution ~ '.yml' if ansible_distribution != ansible_os_family else omit }}" - - "{{ __distribution_major_split ~ '.yml' if __distribution_major_split != __distribution_major else omit }}" - - "{{ __distribution_minor_split ~ '.yml' if __distribution_minor_split != __distribution_minor else omit }}" - - "{{ __distribution_major }}.yml" - - "{{ __distribution_minor }}.yml" + loop: "{{ __var_files }}" vars: __vars_file: "{{ role_path }}/vars/{{ item }}" __distribution_major: "{{ ansible_distribution ~ '_' ~ ansible_distribution_major_version }}" @@ -29,6 +23,17 @@ # Enables loading of shared vars between SLES and SLES_SAP __distribution_major_split: "{{ ansible_distribution.split('_')[0] ~ '_' ~ ansible_distribution_major_version }}" __distribution_minor_split: "{{ ansible_distribution.split('_')[0] ~ '_' ~ ansible_distribution_version }}" + __var_files: >- + {{ + [ + ansible_os_family ~ '.yml', + (ansible_distribution ~ '.yml') if ansible_distribution != ansible_os_family else None, + (__distribution_major_split ~ '.yml') if __distribution_major_split != __distribution_major else None, + (__distribution_minor_split ~ '.yml') if __distribution_minor_split != __distribution_minor else None, + __distribution_major ~ '.yml', + __distribution_minor ~ '.yml' + ] | select('defined') | select('string') | list + }} when: __vars_file is file tags: - always diff --git a/roles/sap_ha_pacemaker_cluster/tasks/include_vars_common.yml b/roles/sap_ha_pacemaker_cluster/tasks/include_vars_common.yml index 0d1d1e6f4..bdc6ea6d2 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/include_vars_common.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/include_vars_common.yml @@ -34,13 +34,7 @@ # 5. SLES_SAP_15.6.yml - Specific to distribution SLES_SAP and minor release. - name: "SAP HA Prepare Pacemaker - Include environment specific variables" ansible.builtin.include_vars: "{{ __vars_file }}" - loop: - - "{{ ansible_os_family }}.yml" - - "{{ ansible_distribution ~ '.yml' if ansible_distribution != ansible_os_family else omit }}" - - "{{ __distribution_major_split ~ '.yml' if __distribution_major_split != __distribution_major else omit }}" - - "{{ __distribution_minor_split ~ '.yml' if __distribution_minor_split != __distribution_minor else omit }}" - - "{{ __distribution_major }}.yml" - - "{{ __distribution_minor }}.yml" + loop: "{{ __var_files }}" vars: __vars_file: "{{ role_path }}/vars/{{ item }}" __distribution_major: "{{ ansible_distribution ~ '_' ~ ansible_distribution_major_version }}" @@ -48,4 +42,15 @@ # Enables loading of shared vars between SLES and SLES_SAP __distribution_major_split: "{{ ansible_distribution.split('_')[0] ~ '_' ~ ansible_distribution_major_version }}" __distribution_minor_split: "{{ ansible_distribution.split('_')[0] ~ '_' ~ ansible_distribution_version }}" + __var_files: >- + {{ + [ + ansible_os_family ~ '.yml', + (ansible_distribution ~ '.yml') if ansible_distribution != ansible_os_family else None, + (__distribution_major_split ~ '.yml') if __distribution_major_split != __distribution_major else None, + (__distribution_minor_split ~ '.yml') if __distribution_minor_split != __distribution_minor else None, + __distribution_major ~ '.yml', + __distribution_minor ~ '.yml' + ] | select('defined') | select('string') | list + }} when: __vars_file is file diff --git a/roles/sap_hana_preconfigure/tasks/main.yml b/roles/sap_hana_preconfigure/tasks/main.yml index 91c6dd51e..ef63a0b8a 100644 --- a/roles/sap_hana_preconfigure/tasks/main.yml +++ b/roles/sap_hana_preconfigure/tasks/main.yml @@ -13,13 +13,7 @@ # 5. SLES_SAP_15.6.yml - Specific to distribution SLES_SAP and minor release. - name: Include OS specific vars, specific ansible.builtin.include_vars: "{{ __vars_file }}" - loop: - - "{{ ansible_os_family }}.yml" - - "{{ ansible_distribution ~ '.yml' if ansible_distribution != ansible_os_family else omit }}" - - "{{ __distribution_major_split ~ '.yml' if __distribution_major_split != __distribution_major else omit }}" - - "{{ __distribution_minor_split ~ '.yml' if __distribution_minor_split != __distribution_minor else omit }}" - - "{{ __distribution_major }}.yml" - - "{{ __distribution_minor }}.yml" + loop: "{{ __var_files }}" vars: __vars_file: "{{ role_path }}/vars/{{ item }}" __distribution_major: "{{ ansible_distribution ~ '_' ~ ansible_distribution_major_version }}" @@ -27,6 +21,17 @@ # Enables loading of shared vars between SLES and SLES_SAP __distribution_major_split: "{{ ansible_distribution.split('_')[0] ~ '_' ~ ansible_distribution_major_version }}" __distribution_minor_split: "{{ ansible_distribution.split('_')[0] ~ '_' ~ ansible_distribution_version }}" + __var_files: >- + {{ + [ + ansible_os_family ~ '.yml', + (ansible_distribution ~ '.yml') if ansible_distribution != ansible_os_family else None, + (__distribution_major_split ~ '.yml') if __distribution_major_split != __distribution_major else None, + (__distribution_minor_split ~ '.yml') if __distribution_minor_split != __distribution_minor else None, + __distribution_major ~ '.yml', + __distribution_minor ~ '.yml' + ] | select('defined') | select('string') | list + }} when: __vars_file is file diff --git a/roles/sap_netweaver_preconfigure/tasks/main.yml b/roles/sap_netweaver_preconfigure/tasks/main.yml index d8d72e325..2f99c60a1 100644 --- a/roles/sap_netweaver_preconfigure/tasks/main.yml +++ b/roles/sap_netweaver_preconfigure/tasks/main.yml @@ -13,13 +13,7 @@ # 5. SLES_SAP_15.6.yml - Specific to distribution SLES_SAP and minor release. - name: Include OS specific vars, specific ansible.builtin.include_vars: "{{ __vars_file }}" - loop: - - "{{ ansible_os_family }}.yml" - - "{{ ansible_distribution ~ '.yml' if ansible_distribution != ansible_os_family else omit }}" - - "{{ __distribution_major_split ~ '.yml' if __distribution_major_split != __distribution_major else omit }}" - - "{{ __distribution_minor_split ~ '.yml' if __distribution_minor_split != __distribution_minor else omit }}" - - "{{ __distribution_major }}.yml" - - "{{ __distribution_minor }}.yml" + loop: "{{ __var_files }}" vars: __vars_file: "{{ role_path }}/vars/{{ item }}" __distribution_major: "{{ ansible_distribution ~ '_' ~ ansible_distribution_major_version }}" @@ -27,6 +21,17 @@ # Enables loading of shared vars between SLES and SLES_SAP __distribution_major_split: "{{ ansible_distribution.split('_')[0] ~ '_' ~ ansible_distribution_major_version }}" __distribution_minor_split: "{{ ansible_distribution.split('_')[0] ~ '_' ~ ansible_distribution_version }}" + __var_files: >- + {{ + [ + ansible_os_family ~ '.yml', + (ansible_distribution ~ '.yml') if ansible_distribution != ansible_os_family else None, + (__distribution_major_split ~ '.yml') if __distribution_major_split != __distribution_major else None, + (__distribution_minor_split ~ '.yml') if __distribution_minor_split != __distribution_minor else None, + __distribution_major ~ '.yml', + __distribution_minor ~ '.yml' + ] | select('defined') | select('string') | list + }} when: __vars_file is file tags: - always From ffd9ffcfecd20480abc2fa307b8c149f15744338 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Tue, 10 Dec 2024 10:58:53 +0100 Subject: [PATCH 15/38] sap_ha_pacemaker_cluster: (fix) hanacontroller clone name prefix per OS --- roles/sap_ha_pacemaker_cluster/defaults/main.yml | 2 +- roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml | 2 +- roles/sap_ha_pacemaker_cluster/tasks/include_vars_hana.yml | 2 +- roles/sap_ha_pacemaker_cluster/vars/hana_scaleup_perf.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/sap_ha_pacemaker_cluster/defaults/main.yml b/roles/sap_ha_pacemaker_cluster/defaults/main.yml index 7947b0afe..b50453b94 100644 --- a/roles/sap_ha_pacemaker_cluster/defaults/main.yml +++ b/roles/sap_ha_pacemaker_cluster/defaults/main.yml @@ -113,7 +113,7 @@ sap_ha_pacemaker_cluster_hana_resource_name: '' # Default: rsc_SAPHa sap_ha_pacemaker_cluster_hana_resource_clone_name: '' # Default: cln_SAPHana__HDB sap_ha_pacemaker_cluster_hana_resource_clone_msl_name: '' # Default: msl_SAPHana__HDB sap_ha_pacemaker_cluster_hanacontroller_resource_name: '' # Default: rsc_SAPHanaCon__HDB -sap_ha_pacemaker_cluster_hanacontroller_resource_clone_name: '' # Default: cln_SAPHanaCon__HDB +sap_ha_pacemaker_cluster_hanacontroller_resource_clone_name: '' # Default: _SAPHanaCon__HDB sap_ha_pacemaker_cluster_hana_topology_resource_name: '' # Default: rsc_SAPHanaTop__HDB sap_ha_pacemaker_cluster_hana_topology_resource_clone_name: '' # Default: cln_SAPHanaTop__HDB sap_ha_pacemaker_cluster_hana_filesystem_resource_name: '' # Default: rsc_SAPHanaFil__HDB diff --git a/roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml b/roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml index 0c55ad7b3..7a7e28468 100644 --- a/roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml +++ b/roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml @@ -427,7 +427,7 @@ argument_specs: - Customize the cluster resource name of the SAP HANA Controller. sap_ha_pacemaker_cluster_hanacontroller_resource_clone_name: - default: "cln_SAPHanaCon__HDB" + default: "_SAPHanaCon__HDB" description: - Customize the cluster resource name of the SAP HANA Controller clone. diff --git a/roles/sap_ha_pacemaker_cluster/tasks/include_vars_hana.yml b/roles/sap_ha_pacemaker_cluster/tasks/include_vars_hana.yml index 172a7d0da..5ff62e75f 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/include_vars_hana.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/include_vars_hana.yml @@ -81,7 +81,7 @@ else sap_ha_pacemaker_cluster_hanacontroller_resource_name }}" __sap_ha_pacemaker_cluster_hanacontroller_resource_clone_name: - "{{ 'cln_SAPHanaCon_' ~ __sap_ha_pacemaker_cluster_hana_sid ~ '_HDB' ~ __sap_ha_pacemaker_cluster_hana_instance_nr + "{{ ('mst' if ansible_os_family == 'Suse' else 'cln') ~ '_SAPHanaCon_' ~ __sap_ha_pacemaker_cluster_hana_sid ~ '_HDB' ~ __sap_ha_pacemaker_cluster_hana_instance_nr if sap_ha_pacemaker_cluster_hanacontroller_resource_clone_name | string | length == 0 else sap_ha_pacemaker_cluster_hanacontroller_resource_clone_name }}" diff --git a/roles/sap_ha_pacemaker_cluster/vars/hana_scaleup_perf.yml b/roles/sap_ha_pacemaker_cluster/vars/hana_scaleup_perf.yml index d43b3905c..1801b2fbe 100644 --- a/roles/sap_ha_pacemaker_cluster/vars/hana_scaleup_perf.yml +++ b/roles/sap_ha_pacemaker_cluster/vars/hana_scaleup_perf.yml @@ -20,7 +20,7 @@ __sap_ha_pacemaker_cluster_hana_hook_dictionary: # Recommended srhooks are set to true only if default dictionary is populated __sap_ha_pacemaker_cluster_hana_hook_tkover: - "{{ true if + "{{ true if (lookup('ansible.builtin.vars', __sap_ha_pacemaker_cluster_hana_hook_dictionary).tkover is defined and (sap_ha_pacemaker_cluster_hana_hook_tkover | bool)) else false }}" From 63f1e7499c2f9e6ada10cd036dc8e042f6256d2a Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Wed, 11 Dec 2024 11:45:44 +0100 Subject: [PATCH 16/38] sap_install_media_detect: Fix wrong sap_export_solman_java detection Fixes #921. The SAP Solution Manager JAVA Export file (e.g. 51054655_4.zip) contains files with the search pattern for 'sap_export_nwas_java' before files with the search pattern for 'sap_export_solman_java'. So we fall through (= do no longer exit) for the search pattern of the SAP Netweaver Java files (e.g. 51055106.zip). This will work as long as such files do not have content which are matched by any other search pattern. Tested with: 51050829_3 (NW 7.5 Installation Export) 51054655_1 (SAP Solution Manager 7.2 SR2 Installation Export I) 51054655_2 (SAP Solution Manager 7.2 SR2 Installation Export II) 51054655_4 (SAP Solution Manager 7.2 SR2 - Java) 51055106 (SAP Netweaver 7.5 SP22 Java) $ sapfile *.zip 51050829_3.zip: sap_export_nwas_abap 51054655_1.zip: sap_export_solman_abap 51054655_2.zip: sap_export_solman_abap 51054655_4.zip: sap_export_solman_java 51055106.zip: sap_export_nwas_java Signed-off-by: Bernd Finger --- roles/sap_install_media_detect/files/tmp/sapfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_install_media_detect/files/tmp/sapfile b/roles/sap_install_media_detect/files/tmp/sapfile index 034285ef6..94f5d6e09 100755 --- a/roles/sap_install_media_detect/files/tmp/sapfile +++ b/roles/sap_install_media_detect/files/tmp/sapfile @@ -286,7 +286,7 @@ for _FILE in "$@"; do /db2setup/{_sap_file_type="ibmdb2"; exit} /db6_update_client.sh/{_sap_file_type="ibmdb2_client"; exit} /db2aese_c.lic/{_sap_file_type="ibmdb2_license"; exit} - /DATA_UNITS\/JAVA_EXPORT_JDMP/{_sap_file_type="sap_export_nwas_java"; exit} + /DATA_UNITS\/JAVA_EXPORT_JDMP/{_sap_file_type="sap_export_nwas_java"} /DATA_UNITS\/EXPORT/{_sap_file_type="sap_export_ecc"; exit} /DATA_UNITS\/EXP[0-9]/{_sap_file_type="sap_export_nwas_abap"; exit} /DATA_UNITS\/SOLMAN/&&/_JAVA_UT/{_sap_file_type="sap_export_solman_java"; exit} From 99831376869d178fadfc1f38e8232569030567d2 Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Mon, 16 Dec 2024 09:48:02 +0100 Subject: [PATCH 17/38] sap-general-preconfigure: try to fix PR --- roles/sap_general_preconfigure/meta/argument_specs.yml | 2 +- roles/sap_general_preconfigure/vars/SLES_15.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/sap_general_preconfigure/meta/argument_specs.yml b/roles/sap_general_preconfigure/meta/argument_specs.yml index a346667b7..d91df6849 100644 --- a/roles/sap_general_preconfigure/meta/argument_specs.yml +++ b/roles/sap_general_preconfigure/meta/argument_specs.yml @@ -348,4 +348,4 @@ argument_specs: example: sap_general_preconfigure_db_group_name: 'en_US.UTF-8' required: false - type: str \ No newline at end of file + type: str diff --git a/roles/sap_general_preconfigure/vars/SLES_15.yml b/roles/sap_general_preconfigure/vars/SLES_15.yml index da250e4de..dd1fb3685 100644 --- a/roles/sap_general_preconfigure/vars/SLES_15.yml +++ b/roles/sap_general_preconfigure/vars/SLES_15.yml @@ -1,7 +1,7 @@ # SPDX-License-Identifier: Apache-2.0 --- __sap_general_preconfigure_sapnotes_versions: - - { number: '2369910', version: '18'} + - { number: '2369910', version: '18'} __sap_general_preconfigure_packages: - uuidd From 7ffeded8264933e8bd8757c2881db5bafc868df5 Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Mon, 16 Dec 2024 10:57:18 +0100 Subject: [PATCH 18/38] Lint fixes for PR --- roles/sap_general_preconfigure/defaults/main.yml | 2 +- roles/sap_general_preconfigure/tasks/sapnote/assert-2369910.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/sap_general_preconfigure/defaults/main.yml b/roles/sap_general_preconfigure/defaults/main.yml index 8eca2d9ef..7b40cc9b8 100644 --- a/roles/sap_general_preconfigure/defaults/main.yml +++ b/roles/sap_general_preconfigure/defaults/main.yml @@ -166,7 +166,7 @@ sap_general_preconfigure_domain: "{{ sap_domain | d(ansible_domain) }}" # Configuring Process Resource Limits # Example: See README.md -# in SAP Note 2369910 SAP requires English locale. +# 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: "" # END: Default Variables for sap_general_preconfigure diff --git a/roles/sap_general_preconfigure/tasks/sapnote/assert-2369910.yml b/roles/sap_general_preconfigure/tasks/sapnote/assert-2369910.yml index 9f96f40c0..d4088c99f 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/assert-2369910.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/assert-2369910.yml @@ -8,7 +8,7 @@ - always ## STEP 3.1 -- System Language -- name: Step 3.1 - Check if English Languge is installed +- name: Step 3.1 - Check if English Language is installed tags: - sap_general_preconfigure_2369910 - sap_general_preconfigure_2369910_03 From 221d71f77678667e3dee41bee0573a29734bd2ac Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Tue, 17 Dec 2024 15:01:19 +0100 Subject: [PATCH 19/38] sap_swpm: Use 'false' instead of 'False' in inifile.params Fixes issue #915. Signed-off-by: Bernd Finger --- roles/sap_swpm/templates/inifile_params.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_swpm/templates/inifile_params.j2 b/roles/sap_swpm/templates/inifile_params.j2 index 56da03da8..94f0cb8f4 100644 --- a/roles/sap_swpm/templates/inifile_params.j2 +++ b/roles/sap_swpm/templates/inifile_params.j2 @@ -801,7 +801,7 @@ UmeConfiguration.umeType = {{ sap_swpm_ume_type }} # BEGIN section nw_config_java_feature_template_ids # # # NW_internal.useProductVersionDescriptor = true -nw_java_import.buildJEEusingExtraMileTool = {{ true if sap_swpm_java_import_method == 'extramile' else false }} +nw_java_import.buildJEEusingExtraMileTool = {{ 'true' if sap_swpm_java_import_method == 'extramile' else 'false' }} # If use PV = true # SAP SWPM 1.0 for SAP NetWeaver AS (JAVA), Product Version Software Instance **Feature Template IDs** comma-separated list From 0ba24dd91221c73bed201c7f78d5ea9cc10281a0 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Tue, 17 Dec 2024 15:09:15 +0100 Subject: [PATCH 20/38] sap_swpm: Add tag to sap_swpm_tmpdir task Fixes issue #917. Signed-off-by: Bernd Finger --- roles/sap_swpm/tasks/pre_install/swpm_prepare.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/sap_swpm/tasks/pre_install/swpm_prepare.yml b/roles/sap_swpm/tasks/pre_install/swpm_prepare.yml index 6a1915edb..15490e497 100644 --- a/roles/sap_swpm/tasks/pre_install/swpm_prepare.yml +++ b/roles/sap_swpm/tasks/pre_install/swpm_prepare.yml @@ -8,6 +8,7 @@ register: sap_swpm_tmpdir tags: - sap_swpm_sapinst_commandline + - sap_swpm_generate_inifile # Copy password file to the same location as inifile.params - name: SAP SWPM Pre Install - Copy password file to the same location as inifile.params From 3ac2d7eea0c55d55c2194dd2b530c59c386556ac Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Fri, 20 Dec 2024 11:37:39 +0100 Subject: [PATCH 21/38] made requested changes for C.UTF-8 locale --- .../tasks/sapnote/2369910.yml | 14 +++++++------- .../tasks/sapnote/assert-2369910.yml | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2369910.yml b/roles/sap_general_preconfigure/tasks/sapnote/2369910.yml index c6bcf6219..a2405b3b1 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2369910.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2369910.yml @@ -25,7 +25,7 @@ success_msg: "PASS: An English locale is installed." - name: Get the current default locale - ansible.builtin.command: awk '/^LANG=/&&/en_/{print}' /etc/locale.conf + ansible.builtin.command: awk '/^LANG=/&&(/C.UTF-8/||/en_/){print}' /etc/locale.conf changed_when: false register: __sap_general_preconfigure_current_default_locale @@ -35,13 +35,13 @@ fail_msg: "FAIL: English is not set as the default locale. Please define an English default locale with the 'sap_general_preconfigure_default_locale' variable!" success_msg: "PASS: An English default locale is set." - - name: Assert that the role variable sap_general_preconfigure_default_locale starts with 'en_' - ansible.builtin.assert: - that: sap_general_preconfigure_default_locale.startswith('en_') - fail_msg: "FAIL: No English locale is defined in variable 'sap_general_preconfigure_default_locale'!" - success_msg: "PASS: The English default locale is valid" - + # Optimization: Check if defined locale is installed, valid and English. + # This code currently allows an invalid locale such as 'en_XY.UTF-74' - name: Configure English locale + when: + - sap_general_preconfigure_default_locale is defined + - sap_general_preconfigure_default_locale | length > 0 + - sap_general_preconfigure_default_locale.startswith('en_') or sap_general_preconfigure_default_locale.startswith('C.UTF-8') ansible.builtin.lineinfile: path: /etc/locale.conf regexp: ^LANG= diff --git a/roles/sap_general_preconfigure/tasks/sapnote/assert-2369910.yml b/roles/sap_general_preconfigure/tasks/sapnote/assert-2369910.yml index d4088c99f..c653619b5 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/assert-2369910.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/assert-2369910.yml @@ -25,12 +25,12 @@ success_msg: "PASS: An English locale is installed." - name: Get the current default locale - ansible.builtin.command: awk '/^LANG=/&&/en_/{print}' /etc/locale.conf + ansible.builtin.command: awk '/^LANG=/&&(/C.UTF-8/||/en_/){print}' /etc/locale.conf changed_when: false register: __sap_general_preconfigure_current_default_locale - name: Assert that an English locale is the default ansible.builtin.assert: that: __sap_general_preconfigure_current_default_locale.stdout_lines | length > 0 - fail_msg: "FAIL: English is not set as the default locale. Please define an English default locale with the 'sap_general_preconfigure_default_locale' variable!" + fail_msg: "FAIL: English is not set as the default locale. Please define a valid English default locale with the variable 'sap_general_preconfigure_default_locale' !" success_msg: "PASS: An English default locale is set." From de5988fbf7812d55fa576b5758aa840b80e7691b Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Fri, 20 Dec 2024 15:34:06 +0100 Subject: [PATCH 22/38] typo in arguments.specs gefixt --- roles/sap_general_preconfigure/meta/argument_specs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_general_preconfigure/meta/argument_specs.yml b/roles/sap_general_preconfigure/meta/argument_specs.yml index d91df6849..1a35f7eee 100644 --- a/roles/sap_general_preconfigure/meta/argument_specs.yml +++ b/roles/sap_general_preconfigure/meta/argument_specs.yml @@ -346,6 +346,6 @@ argument_specs: description: - Use this variable to specify the default system locale. example: - sap_general_preconfigure_db_group_name: 'en_US.UTF-8' + sap_general_preconfigure_default_locale: 'en_US.UTF-8' required: false type: str From 6715920348c4a1c1c4b3ea92980471dc0cb9164e Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Fri, 20 Dec 2024 15:52:25 +0100 Subject: [PATCH 23/38] default locale was not set when non-english locale was default --- .../tasks/sapnote/2369910.yml | 25 +++++++++---------- roles/sap_general_preconfigure/vars/Suse.yml | 2 +- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2369910.yml b/roles/sap_general_preconfigure/tasks/sapnote/2369910.yml index a2405b3b1..981386bca 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2369910.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2369910.yml @@ -24,23 +24,11 @@ fail_msg: "FAIL: No English locale is installed. Please install an English locale!" success_msg: "PASS: An English locale is installed." - - name: Get the current default locale - ansible.builtin.command: awk '/^LANG=/&&(/C.UTF-8/||/en_/){print}' /etc/locale.conf - changed_when: false - register: __sap_general_preconfigure_current_default_locale - - - name: Assert that an English locale is the default - ansible.builtin.assert: - that: __sap_general_preconfigure_current_default_locale.stdout_lines | length > 0 - fail_msg: "FAIL: English is not set as the default locale. Please define an English default locale with the 'sap_general_preconfigure_default_locale' variable!" - success_msg: "PASS: An English default locale is set." - - # Optimization: Check if defined locale is installed, valid and English. - # This code currently allows an invalid locale such as 'en_XY.UTF-74' - name: Configure English locale when: - sap_general_preconfigure_default_locale is defined - sap_general_preconfigure_default_locale | length > 0 + - __sap_general_preconfigure_locales_installed.stdout_lines | select('match', sap_general_preconfigure_default_locale) | list | length > 0 - sap_general_preconfigure_default_locale.startswith('en_') or sap_general_preconfigure_default_locale.startswith('C.UTF-8') ansible.builtin.lineinfile: path: /etc/locale.conf @@ -51,3 +39,14 @@ owner: root group: root mode: '0644' + + - name: Get the current default locale + ansible.builtin.command: awk '/^LANG=/&&(/C.UTF-8/||/en_/){print}' /etc/locale.conf + changed_when: false + register: __sap_general_preconfigure_current_default_locale + + - name: Assert that an English locale is the default + ansible.builtin.assert: + that: __sap_general_preconfigure_current_default_locale.stdout_lines | length > 0 + fail_msg: "FAIL: English is not set as the default locale. Please define an English default locale with the 'sap_general_preconfigure_default_locale' variable!" + success_msg: "PASS: An English default locale is set." diff --git a/roles/sap_general_preconfigure/vars/Suse.yml b/roles/sap_general_preconfigure/vars/Suse.yml index 7673eb20d..0103ed647 100644 --- a/roles/sap_general_preconfigure/vars/Suse.yml +++ b/roles/sap_general_preconfigure/vars/Suse.yml @@ -7,7 +7,7 @@ # - SUSE Linux Enterprise Server 16 __sap_general_preconfigure_sapnotes_versions: - - { number: '2369910', version: '18'} + - '' # { number: '2369910', version: '18'} __sap_general_preconfigure_packages: - uuidd From c0d9e33477e0339fbb78faa1419c8e019b932f07 Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Fri, 20 Dec 2024 16:35:31 +0100 Subject: [PATCH 24/38] change because locale -a always creates *.utf8 --- roles/sap_general_preconfigure/tasks/sapnote/2369910.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2369910.yml b/roles/sap_general_preconfigure/tasks/sapnote/2369910.yml index 981386bca..8e17e19e6 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2369910.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2369910.yml @@ -28,7 +28,7 @@ when: - sap_general_preconfigure_default_locale is defined - sap_general_preconfigure_default_locale | length > 0 - - __sap_general_preconfigure_locales_installed.stdout_lines | select('match', sap_general_preconfigure_default_locale) | list | length > 0 + - __sap_general_preconfigure_locales_installed.stdout_lines | select('match', sap_general_preconfigure_default_locale | regex_replace('UTF-8', 'utf8')) | list | length > 0 - sap_general_preconfigure_default_locale.startswith('en_') or sap_general_preconfigure_default_locale.startswith('C.UTF-8') ansible.builtin.lineinfile: path: /etc/locale.conf From 6edc72ecb88abcc04bc97d3b3bfccbd8aaca3c86 Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Fri, 27 Dec 2024 09:27:47 +0100 Subject: [PATCH 25/38] Corrected when statement --- roles/sap_general_preconfigure/tasks/sapnote/2369910.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2369910.yml b/roles/sap_general_preconfigure/tasks/sapnote/2369910.yml index 8e17e19e6..7f8161e93 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2369910.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2369910.yml @@ -28,8 +28,12 @@ when: - sap_general_preconfigure_default_locale is defined - sap_general_preconfigure_default_locale | length > 0 - - __sap_general_preconfigure_locales_installed.stdout_lines | select('match', sap_general_preconfigure_default_locale | regex_replace('UTF-8', 'utf8')) | list | length > 0 - - sap_general_preconfigure_default_locale.startswith('en_') or sap_general_preconfigure_default_locale.startswith('C.UTF-8') + - > + (__sap_general_preconfigure_locales_installed.stdout_lines | select('match', sap_general_preconfigure_default_locale) | list | length > 0) or + (__sap_general_preconfigure_locales_installed.stdout_lines | select('match', (sap_general_preconfigure_default_locale | regex_replace('UTF-8', 'utf8'))) | list | length > 0) + - > + sap_general_preconfigure_default_locale.startswith('en_') or + sap_general_preconfigure_default_locale.startswith('C.UTF-8') ansible.builtin.lineinfile: path: /etc/locale.conf regexp: ^LANG= From 8cd07e27ca757e26a7093a3f4d9bfa4697d1ad4b Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Thu, 2 Jan 2025 11:55:34 +0100 Subject: [PATCH 26/38] sap_swpm: Use master password only when necessary Solves issue #909. Signed-off-by: Bernd Finger --- roles/sap_swpm/tasks/pre_install/generate_inifile.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/sap_swpm/tasks/pre_install/generate_inifile.yml b/roles/sap_swpm/tasks/pre_install/generate_inifile.yml index 7a53ba7bb..4a72e1f65 100644 --- a/roles/sap_swpm/tasks/pre_install/generate_inifile.yml +++ b/roles/sap_swpm/tasks/pre_install/generate_inifile.yml @@ -110,6 +110,7 @@ sap_swpm_sapadm_password: "{{ sap_swpm_master_password }}" sap_swpm_sap_sidadm_password: "{{ sap_swpm_master_password }}" sap_swpm_diagnostics_agent_password: "{{ sap_swpm_master_password }}" + when: sap_swpm_master_password is defined and sap_swpm_master_password # Generate inifile.params, step 1: Process SWPM Configfile template locally for creating inifile.params - name: SAP SWPM Pre Install, create inifile - Process SWPM inifile template for creating 'inifile.params' From eba616365cc05ef419bd62d1cfc2512b58e1ef98 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 3 Jan 2025 10:54:11 +0100 Subject: [PATCH 27/38] sap_swpm: Support empty individual passwords Signed-off-by: Bernd Finger --- .../tasks/pre_install/generate_inifile.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/roles/sap_swpm/tasks/pre_install/generate_inifile.yml b/roles/sap_swpm/tasks/pre_install/generate_inifile.yml index 4a72e1f65..2f4199677 100644 --- a/roles/sap_swpm/tasks/pre_install/generate_inifile.yml +++ b/roles/sap_swpm/tasks/pre_install/generate_inifile.yml @@ -105,12 +105,18 @@ sap_swpm_db_schema_password: "{{ sap_swpm_db_schema_java_password }}" when: "'Java' in sap_swpm_product_catalog_id" +# If the individual passwords are set to a non empty string, use those: - name: SAP SWPM Pre Install - Set other user passwords using master password ansible.builtin.set_fact: - sap_swpm_sapadm_password: "{{ sap_swpm_master_password }}" - sap_swpm_sap_sidadm_password: "{{ sap_swpm_master_password }}" - sap_swpm_diagnostics_agent_password: "{{ sap_swpm_master_password }}" - when: sap_swpm_master_password is defined and sap_swpm_master_password + sap_swpm_sapadm_password: "{{ sap_swpm_master_password + if sap_swpm_master_password | d('') and not sap_swpm_sapadm_password | d('') + else sap_swpm_sapadm_password | d('') }}" + sap_swpm_sap_sidadm_password: "{{ sap_swpm_master_password + if sap_swpm_master_password | d('') and not sap_swpm_sap_sidadm_password | d('') + else sap_swpm_sap_sidadm_password | d('') }}" + sap_swpm_diagnostics_agent_password: "{{ sap_swpm_master_password + if sap_swpm_master_password | d('') and not sap_swpm_diagnostics_agent_password | d('') + else sap_swpm_diagnostics_agent_password | d('') }}" # Generate inifile.params, step 1: Process SWPM Configfile template locally for creating inifile.params - name: SAP SWPM Pre Install, create inifile - Process SWPM inifile template for creating 'inifile.params' From 8fb50591a99591a70163e3daa0db3fc50339ad8d Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 3 Jan 2025 17:52:33 +0100 Subject: [PATCH 28/38] sap_general_preconfigure: Simplify setting the locale Signed-off-by: Bernd Finger --- .../tasks/sapnote/2369910.yml | 43 ++++++------------- 1 file changed, 12 insertions(+), 31 deletions(-) diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2369910.yml b/roles/sap_general_preconfigure/tasks/sapnote/2369910.yml index 7f8161e93..0264946fa 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2369910.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2369910.yml @@ -13,44 +13,25 @@ - sap_general_preconfigure_2369910 - sap_general_preconfigure_configure_locale block: - - name: Get list of installed locales - ansible.builtin.command: locale -a - changed_when: false - register: __sap_general_preconfigure_locales_installed - - - name: Assert that an English locale is installed - ansible.builtin.assert: - that: __sap_general_preconfigure_locales_installed.stdout_lines | select('match', '^en_') | list | length > 0 - fail_msg: "FAIL: No English locale is installed. Please install an English locale!" - success_msg: "PASS: An English locale is installed." - - - name: Configure English locale + - name: Configure an English locale when: - - sap_general_preconfigure_default_locale is defined - - sap_general_preconfigure_default_locale | length > 0 - - > - (__sap_general_preconfigure_locales_installed.stdout_lines | select('match', sap_general_preconfigure_default_locale) | list | length > 0) or - (__sap_general_preconfigure_locales_installed.stdout_lines | select('match', (sap_general_preconfigure_default_locale | regex_replace('UTF-8', 'utf8'))) | list | length > 0) - - > - sap_general_preconfigure_default_locale.startswith('en_') or - sap_general_preconfigure_default_locale.startswith('C.UTF-8') - ansible.builtin.lineinfile: - path: /etc/locale.conf - regexp: ^LANG= - line: "LANG=\"{{ sap_general_preconfigure_default_locale }}\"" - state: present - create: true - owner: root - group: root - mode: '0644' + - sap_general_preconfigure_default_locale is defined and sap_general_preconfigure_default_locale + - sap_general_preconfigure_default_locale == 'C.UTF-8' or + sap_general_preconfigure_default_locale == 'C.utf8' or + sap_general_preconfigure_default_locale.startswith('en_') and + (sap_general_preconfigure_default_locale.endswith('UTF-8') or + sap_general_preconfigure_default_locale.endswith('utf8')) + ansible.builtin.command: "localectl set-locale LANG={{ sap_general_preconfigure_default_locale }}" - name: Get the current default locale - ansible.builtin.command: awk '/^LANG=/&&(/C.UTF-8/||/en_/){print}' /etc/locale.conf + ansible.builtin.command: awk '{gsub("\"","")}/^LANG=/&&(/=C\./||/=en_/)&&(/utf8$/||/UTF-8$/){print}' /etc/locale.conf changed_when: false register: __sap_general_preconfigure_current_default_locale - name: Assert that an English locale is the default ansible.builtin.assert: that: __sap_general_preconfigure_current_default_locale.stdout_lines | length > 0 - fail_msg: "FAIL: English is not set as the default locale. Please define an English default locale with the 'sap_general_preconfigure_default_locale' variable!" + fail_msg: > + "FAIL: English is not set as the default locale. Please define an English default locale + with the 'sap_general_preconfigure_default_locale' variable!" success_msg: "PASS: An English default locale is set." From d3beb5079b44e21b6d11aaa75410969755289a5f Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 3 Jan 2025 17:53:19 +0100 Subject: [PATCH 29/38] sap_general_preconfigure: Also support SLES Signed-off-by: Bernd Finger --- roles/sap_general_preconfigure/vars/Suse.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_general_preconfigure/vars/Suse.yml b/roles/sap_general_preconfigure/vars/Suse.yml index 0103ed647..f43013ded 100644 --- a/roles/sap_general_preconfigure/vars/Suse.yml +++ b/roles/sap_general_preconfigure/vars/Suse.yml @@ -7,7 +7,7 @@ # - SUSE Linux Enterprise Server 16 __sap_general_preconfigure_sapnotes_versions: - - '' # { number: '2369910', version: '18'} + - { number: '2369910', version: '18' } __sap_general_preconfigure_packages: - uuidd From 87daa60aaf9d97b16eab5136587967d408d15efe Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 3 Jan 2025 18:00:40 +0100 Subject: [PATCH 30/38] sap_general_preconfigure: Add changed_when ... to the task running the localectl set-locale command Signed-off-by: Bernd Finger --- roles/sap_general_preconfigure/tasks/sapnote/2369910.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2369910.yml b/roles/sap_general_preconfigure/tasks/sapnote/2369910.yml index 0264946fa..20de2aa0d 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2369910.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2369910.yml @@ -22,6 +22,7 @@ (sap_general_preconfigure_default_locale.endswith('UTF-8') or sap_general_preconfigure_default_locale.endswith('utf8')) ansible.builtin.command: "localectl set-locale LANG={{ sap_general_preconfigure_default_locale }}" + changed_when: true - name: Get the current default locale ansible.builtin.command: awk '{gsub("\"","")}/^LANG=/&&(/=C\./||/=en_/)&&(/utf8$/||/UTF-8$/){print}' /etc/locale.conf From e956d8252b449506c9174ba780b79d63d630beb9 Mon Sep 17 00:00:00 2001 From: Marcel Mamula Date: Mon, 6 Jan 2025 11:49:33 +0100 Subject: [PATCH 31/38] feat: add variables for sap_install collection name --- roles/sap_general_preconfigure/defaults/main.yml | 3 +++ .../tasks/sapnote/2002167/03-setting-the-hostname.yml | 2 +- .../tasks/sapnote/2772999/03-configure-hostname.yml | 2 +- .../tasks/sapnote/3108316/03-configure-hostname.yml | 2 +- roles/sap_swpm/defaults/main.yml | 3 +++ roles/sap_swpm/tasks/pre_install/update_etchosts.yml | 4 ++-- 6 files changed, 11 insertions(+), 5 deletions(-) diff --git a/roles/sap_general_preconfigure/defaults/main.yml b/roles/sap_general_preconfigure/defaults/main.yml index 5cef8b737..11a116e2f 100644 --- a/roles/sap_general_preconfigure/defaults/main.yml +++ b/roles/sap_general_preconfigure/defaults/main.yml @@ -31,6 +31,9 @@ sap_general_preconfigure_system_roles_collection: 'fedora.linux_system_roles' # - fedora.linux_system_roles # - redhat.rhel_system_roles +sap_general_preconfigure_sap_install_collection: 'community.sap_install' +# Set which Ansible Collection to use for the sap_install. + sap_general_preconfigure_enable_repos: false # Set to `true` if you want the role to enable the repos as configured by the following repo related parameters. # The default is `false`, meaning that the role will not enable repos. diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2002167/03-setting-the-hostname.yml b/roles/sap_general_preconfigure/tasks/sapnote/2002167/03-setting-the-hostname.yml index 9e96a2657..bf642b1ac 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2002167/03-setting-the-hostname.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2002167/03-setting-the-hostname.yml @@ -16,7 +16,7 @@ - name: Import role sap_maintain_etc_hosts ansible.builtin.import_role: - name: 'community.sap_install.sap_maintain_etc_hosts' + name: '{{ sap_general_preconfigure_sap_install_collection }}.sap_maintain_etc_hosts' vars: sap_maintain_etc_hosts_list: - node_ip: "{{ sap_general_preconfigure_ip }}" diff --git a/roles/sap_general_preconfigure/tasks/sapnote/2772999/03-configure-hostname.yml b/roles/sap_general_preconfigure/tasks/sapnote/2772999/03-configure-hostname.yml index 1a22f7c6b..3f04c4e21 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/2772999/03-configure-hostname.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/2772999/03-configure-hostname.yml @@ -16,7 +16,7 @@ - name: Import role sap_maintain_etc_hosts ansible.builtin.import_role: - name: 'community.sap_install.sap_maintain_etc_hosts' + name: '{{ sap_general_preconfigure_sap_install_collection }}.sap_maintain_etc_hosts' vars: sap_maintain_etc_hosts_list: - node_ip: "{{ sap_general_preconfigure_ip }}" diff --git a/roles/sap_general_preconfigure/tasks/sapnote/3108316/03-configure-hostname.yml b/roles/sap_general_preconfigure/tasks/sapnote/3108316/03-configure-hostname.yml index fab19c6b6..15b884b9d 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/3108316/03-configure-hostname.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/3108316/03-configure-hostname.yml @@ -16,7 +16,7 @@ - name: Import role sap_maintain_etc_hosts ansible.builtin.import_role: - name: 'community.sap_install.sap_maintain_etc_hosts' + name: '{{ sap_general_preconfigure_sap_install_collection }}.sap_maintain_etc_hosts' vars: sap_maintain_etc_hosts_list: - node_ip: "{{ sap_general_preconfigure_ip }}" diff --git a/roles/sap_swpm/defaults/main.yml b/roles/sap_swpm/defaults/main.yml index 28913cb74..8e0e30ff0 100644 --- a/roles/sap_swpm/defaults/main.yml +++ b/roles/sap_swpm/defaults/main.yml @@ -449,3 +449,6 @@ sap_swpm_update_etchosts: false # Display SAP SWPM Unattended Mode output (sapinst stdout) sap_swpm_display_unattended_output: false + +# Set which Ansible Collection to use for the sap_install. +sap_swpm_sap_install_collection: 'community.sap_install' diff --git a/roles/sap_swpm/tasks/pre_install/update_etchosts.yml b/roles/sap_swpm/tasks/pre_install/update_etchosts.yml index 815ae29e6..b5c97ab6f 100644 --- a/roles/sap_swpm/tasks/pre_install/update_etchosts.yml +++ b/roles/sap_swpm/tasks/pre_install/update_etchosts.yml @@ -12,7 +12,7 @@ - name: SAP SWPM Pre Install - Update '/etc/hosts' for NW ansible.builtin.import_role: - name: 'community.sap_install.sap_maintain_etc_hosts' + name: '{{ sap_swpm_sap_install_collection }}.sap_maintain_etc_hosts' vars: sap_maintain_etc_hosts_list: - node_ip: "{{ ansible_default_ipv4.address | d(ansible_all_ipv4_addresses[0]) }}" @@ -46,7 +46,7 @@ - name: SAP SWPM Pre Install - Update '/etc/hosts' for HANA ansible.builtin.import_role: - name: 'community.sap_install.sap_maintain_etc_hosts' + name: '{{ sap_swpm_sap_install_collection }}.sap_maintain_etc_hosts' vars: sap_maintain_etc_hosts_list: - node_ip: "{{ sap_swpm_db_ip }}" From a40da4c238a8633142eeff60cba04c04545bcf1c Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Tue, 7 Jan 2025 11:43:18 +0100 Subject: [PATCH 32/38] sap_swpm, sap_general_preconfigure: Sync argument_specs.yml Also slightly modify the variable description. Signed-off-by: Bernd Finger --- roles/sap_general_preconfigure/defaults/main.yml | 2 +- roles/sap_general_preconfigure/meta/argument_specs.yml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/roles/sap_general_preconfigure/defaults/main.yml b/roles/sap_general_preconfigure/defaults/main.yml index 11a116e2f..56240a98c 100644 --- a/roles/sap_general_preconfigure/defaults/main.yml +++ b/roles/sap_general_preconfigure/defaults/main.yml @@ -32,7 +32,7 @@ sap_general_preconfigure_system_roles_collection: 'fedora.linux_system_roles' # - redhat.rhel_system_roles sap_general_preconfigure_sap_install_collection: 'community.sap_install' -# Set which Ansible Collection to use for the sap_install. +# Set which Ansible Collection to use when calling sap_install roles. sap_general_preconfigure_enable_repos: false # Set to `true` if you want the role to enable the repos as configured by the following repo related parameters. diff --git a/roles/sap_general_preconfigure/meta/argument_specs.yml b/roles/sap_general_preconfigure/meta/argument_specs.yml index aaf3cf4a1..8ea3189a8 100644 --- a/roles/sap_general_preconfigure/meta/argument_specs.yml +++ b/roles/sap_general_preconfigure/meta/argument_specs.yml @@ -75,6 +75,12 @@ argument_specs: required: false type: str + sap_general_preconfigure_sap_install_collection: + default: 'community.sap_install' + description: Set which Ansible Collection to use when calling sap_install roles. + required: false + type: str + sap_general_preconfigure_enable_repos: default: false description: From f5f52107919207f2ae03c0133e8782056097cc24 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Tue, 7 Jan 2025 11:48:33 +0100 Subject: [PATCH 33/38] sap_swpm: Slightly modify the variable description Signed-off-by: Bernd Finger --- roles/sap_swpm/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_swpm/defaults/main.yml b/roles/sap_swpm/defaults/main.yml index 8e0e30ff0..89bf1902f 100644 --- a/roles/sap_swpm/defaults/main.yml +++ b/roles/sap_swpm/defaults/main.yml @@ -450,5 +450,5 @@ sap_swpm_update_etchosts: false # Display SAP SWPM Unattended Mode output (sapinst stdout) sap_swpm_display_unattended_output: false -# Set which Ansible Collection to use for the sap_install. +# Set which Ansible Collection to use when calling sap_install roles. sap_swpm_sap_install_collection: 'community.sap_install' From 8a28a9358622a4d15f305fc6d351baf292d7e97e Mon Sep 17 00:00:00 2001 From: Marcel Mamula Date: Wed, 8 Jan 2025 10:27:07 +0100 Subject: [PATCH 34/38] feat: rework angi pre steps and add sles 16 vars --- roles/sap_ha_pacemaker_cluster/README.md | 3 +- .../meta/argument_specs.yml | 3 +- .../tasks/Suse/pre_steps_hana.yml | 47 ++++++++++++++++++- .../sap_ha_pacemaker_cluster/vars/SLES_16.yml | 35 ++++++++++++++ roles/sap_ha_pacemaker_cluster/vars/Suse.yml | 15 +----- 5 files changed, 87 insertions(+), 16 deletions(-) create mode 100644 roles/sap_ha_pacemaker_cluster/vars/SLES_16.yml diff --git a/roles/sap_ha_pacemaker_cluster/README.md b/roles/sap_ha_pacemaker_cluster/README.md index a74280e49..c85964e20 100644 --- a/roles/sap_ha_pacemaker_cluster/README.md +++ b/roles/sap_ha_pacemaker_cluster/README.md @@ -883,7 +883,8 @@ sap_ha_pacemaker_cluster_resource_defaults: - _Type:_ `string`
- _Default:_ `True`
-Disabling this variable enables to use Classic SAPHanaSR agents even on server, with SAPHanaSR-angi is available.
+Disabling this variable enables to use Classic SAPHanaSR agents even on server, where SAPHanaSR-angi is available.
+Value `false` (Classic) is ignored when only SAPHanaSR-angi packages are available.
### sap_ha_pacemaker_cluster_sbd_devices - _Type:_ `list`
diff --git a/roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml b/roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml index 7a7e28468..8f699c35d 100644 --- a/roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml +++ b/roles/sap_ha_pacemaker_cluster/meta/argument_specs.yml @@ -558,7 +558,8 @@ argument_specs: default: true description: - Disabling this variable enables to use Classic SAPHanaSR agents even on server, - with SAPHanaSR-angi is available. + where SAPHanaSR-angi is available. + - Value `false` (Classic) is ignored when only SAPHanaSR-angi packages are available. ########################################################################## # NetWeaver specific parameters diff --git a/roles/sap_ha_pacemaker_cluster/tasks/Suse/pre_steps_hana.yml b/roles/sap_ha_pacemaker_cluster/tasks/Suse/pre_steps_hana.yml index 6f6d031e2..3e2d2f04b 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/Suse/pre_steps_hana.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/Suse/pre_steps_hana.yml @@ -6,7 +6,8 @@ # This is destructive step if executed on running cluster # without proper migration from SAPHanaSR to SAPHanaSR-angi! -- name: "SAP HA Prepare Pacemaker - Block for detection of SAPHanaSR-angi" + +- name: "SAP HA Prepare Pacemaker - Block for preparation of SAPHanaSR-angi HANA cluster" when: (sap_ha_pacemaker_cluster_saphanasr_angi_detection | bool) block: # Requirement for package_facts Ansible Module @@ -27,6 +28,8 @@ register: __sap_ha_pacemaker_cluster_zypper_angi_check failed_when: false + + # Uninstall SAPHanaSR package on SLES 15 # package can be replaced with "rpm -e --nodeps {{ item }}" - name: "SAP HA Prepare Pacemaker - Remove SAPHanaSR and SAPHanaSR-doc" ansible.builtin.package: @@ -39,6 +42,8 @@ - __sap_ha_pacemaker_cluster_zypper_angi_check is defined - __sap_ha_pacemaker_cluster_zypper_angi_check.rc == 0 - "'SAPHanaSR' in ansible_facts.packages" + # SAPHanaSR (Classic) is not available on SLES 16 + - ansible_distribution_major_version | int < 16 - name: "SAP HA Prepare Pacemaker - Set fact angi_available" ansible.builtin.set_fact: @@ -46,3 +51,43 @@ when: - __sap_ha_pacemaker_cluster_zypper_angi_check is defined - __sap_ha_pacemaker_cluster_zypper_angi_check.rc == 0 + + +- name: "SAP HA Prepare Pacemaker - Block for preparation of Classic HANA cluster" + when: + - not (sap_ha_pacemaker_cluster_saphanasr_angi_detection | bool) + # SAPHanaSR (Classic) is not available on SLES 16 + - ansible_distribution_major_version | int < 16 + block: + # Requirement for package_facts Ansible Module + # SLES: Ensure OS Package for Python Lib of rpm bindings is enabled for System Python + - name: "SAP HA Prepare Pacemaker - Ensure python3-rpm package is present" + ansible.builtin.package: + name: python3-rpm + state: present + + - name: "SAP HA Prepare Pacemaker - Gather installed packages facts" + ansible.builtin.package_facts: + manager: auto + + # package can be replaced with "rpm -e --nodeps {{ item }}" + - name: "SAP HA Prepare Pacemaker - Remove SAPHanaSR-angi" + ansible.builtin.package: + name: "{{ item }}" + state: absent + loop: + - SAPHanaSR-angi + when: + - "'SAPHanaSR-angi' in ansible_facts.packages" + + - name: "SAP HA Prepare Pacemaker - Set fact angi_available" + ansible.builtin.set_fact: + __sap_ha_pacemaker_cluster_saphanasr_angi_available: false + + +# Ensure that angi flag is always set for SLES 16 +- name: "SAP HA Prepare Pacemaker - Ensure angi_available is set for SLES 16" + ansible.builtin.set_fact: + __sap_ha_pacemaker_cluster_saphanasr_angi_available: true + when: + - ansible_distribution_major_version | int > 15 diff --git a/roles/sap_ha_pacemaker_cluster/vars/SLES_16.yml b/roles/sap_ha_pacemaker_cluster/vars/SLES_16.yml new file mode 100644 index 000000000..8a9f66af2 --- /dev/null +++ b/roles/sap_ha_pacemaker_cluster/vars/SLES_16.yml @@ -0,0 +1,35 @@ +# SPDX-License-Identifier: Apache-2.0 +--- +# Variables specific to following versions: +# - SUSE Linux Enterprise Server for SAP Applications 16 +# - SUSE Linux Enterprise Server 16 + +# Dictionary with additional cluster packages for specific scenarios +__sap_ha_pacemaker_cluster_sap_extra_packages_dict: + minimal: [] # All minimal packages are part of patterns + hana_scaleout: + - patterns-sap-HADB + hana_scaleup: + - patterns-sap-HADB + hana_angi: [] # SAPHanaSR-angi package is part of patterns-sap-HADB + nwas: + - patterns-sap-HAAPP + +# Package list was simplified because of new patterns below: + +# patterns-sap-HADB contains: +# - patterns-sles_sap_DB +# - patterns-ha-ha_sles +# - SAPHanaSR-angi +# - ClusterTools2 +# - supportutils-plugin-ha-sap +# - socat + +# patterns-sap-HAAPP contains: +# - patterns-sles_sap_APP +# - patterns-ha-ha_sles +# - sapstartsrv-resource-agents +# - sap-suse-cluster-connector +# - ClusterTools2 +# - supportutils-plugin-ha-sap +# - socat diff --git a/roles/sap_ha_pacemaker_cluster/vars/Suse.yml b/roles/sap_ha_pacemaker_cluster/vars/Suse.yml index 2d7fda4c1..18cd8dfcf 100644 --- a/roles/sap_ha_pacemaker_cluster/vars/Suse.yml +++ b/roles/sap_ha_pacemaker_cluster/vars/Suse.yml @@ -50,20 +50,9 @@ __sap_ha_pacemaker_cluster_platform_extra_packages_dict: - socat # Dictionary with additional cluster packages for specific scenarios +# All packages are defined in SLES_15 and SLES_16 var files. __sap_ha_pacemaker_cluster_sap_extra_packages_dict: - minimal: - # Pattern contains all required cluster packages - - patterns-ha-ha_sles - - ClusterTools2 - hana_scaleout: - - SAPHanaSR-ScaleOut - hana_scaleup: - - SAPHanaSR - hana_angi: - - SAPHanaSR-angi - nwas: - - sap-suse-cluster-connector - - sapstartsrv-resource-agents + {} # Dictionary with preferred platform specific VIP method that differs from default __sap_ha_pacemaker_cluster_vip_method_dict: From de43ef4754c7d2649e9819f529eee727f2bf42d9 Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Mon, 13 Jan 2025 14:11:19 +0100 Subject: [PATCH 35/38] sap_general_preconfigure: Use the same awk command also for assert Signed-off-by: Bernd Finger --- roles/sap_general_preconfigure/tasks/sapnote/assert-2369910.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/sap_general_preconfigure/tasks/sapnote/assert-2369910.yml b/roles/sap_general_preconfigure/tasks/sapnote/assert-2369910.yml index c653619b5..e14f88ebb 100644 --- a/roles/sap_general_preconfigure/tasks/sapnote/assert-2369910.yml +++ b/roles/sap_general_preconfigure/tasks/sapnote/assert-2369910.yml @@ -25,7 +25,7 @@ success_msg: "PASS: An English locale is installed." - name: Get the current default locale - ansible.builtin.command: awk '/^LANG=/&&(/C.UTF-8/||/en_/){print}' /etc/locale.conf + ansible.builtin.command: awk '{gsub("\"","")}/^LANG=/&&(/=C\./||/=en_/)&&(/utf8$/||/UTF-8$/){print}' /etc/locale.conf changed_when: false register: __sap_general_preconfigure_current_default_locale From 78aacee8afcbde30a6134636e78da2103c31d085 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Tue, 14 Jan 2025 15:11:44 +0100 Subject: [PATCH 36/38] sap_ha_pacemaker_cluster: enable Simple Mount on RHEL --- .../tasks/RedHat/pre_steps_nwas_ascs_ers.yml | 23 +++++++++++++++++++ .../tasks/include_vars_nwas.yml | 6 +++++ .../sap_ha_pacemaker_cluster/vars/RedHat.yml | 3 ++- 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 roles/sap_ha_pacemaker_cluster/tasks/RedHat/pre_steps_nwas_ascs_ers.yml diff --git a/roles/sap_ha_pacemaker_cluster/tasks/RedHat/pre_steps_nwas_ascs_ers.yml b/roles/sap_ha_pacemaker_cluster/tasks/RedHat/pre_steps_nwas_ascs_ers.yml new file mode 100644 index 000000000..71ecb9227 --- /dev/null +++ b/roles/sap_ha_pacemaker_cluster/tasks/RedHat/pre_steps_nwas_ascs_ers.yml @@ -0,0 +1,23 @@ +# SPDX-License-Identifier: Apache-2.0 +--- +# Identify the version of the resource agents and disable +# the use of "SimpleMount" if a minimum version is not satisfied. + +- name: "SAP HA Prepare Pacemaker - Block for detection of 'SAPStartSrv' availability" + block: + + - name: "SAP HA Prepare Pacemaker - Check the resource agents package" + ansible.builtin.shell: + set -o pipefail && \ + dnf info resource-agents-sap | awk '/^Version/ {print $3}' | sort | tail -n1 + register: __sap_ha_pacemaker_cluster_sapstartsrv_check + changed_when: false + failed_when: false + + - name: "SAP HA Prepare Pacemaker - Disable Simple Mount when min. package version is not available" + ansible.builtin.set_fact: + sap_ha_pacemaker_cluster_nwas_cs_ers_simple_mount: false + when: + - sap_ha_pacemaker_cluster_nwas_cs_ers_simple_mount | bool + - __sap_ha_pacemaker_cluster_sapstartsrv_check.stdout is defined + - "(__sap_ha_pacemaker_cluster_sapstartsrv_check.stdout) is version(__sap_ha_pacemaker_cluster_nwas_simple_mount_version, '<')" diff --git a/roles/sap_ha_pacemaker_cluster/tasks/include_vars_nwas.yml b/roles/sap_ha_pacemaker_cluster/tasks/include_vars_nwas.yml index ffbef8df0..0759f9e79 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/include_vars_nwas.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/include_vars_nwas.yml @@ -13,6 +13,12 @@ when: - "(role_path + '/vars/' + include_item + '.yml') is file" +- name: "SAP HA Prepare Pacemaker - Run NETWEAVER pre-steps" + ansible.builtin.include_tasks: + file: "{{ ansible_facts['os_family'] }}/pre_steps_nwas_ascs_ers.yml" + when: + - ansible_os_family == 'RedHat' + - sap_ha_pacemaker_cluster_host_type | select('search', 'nwas') | length > 0 # Private variables are assigned following logic: # 1. Use backwards compatible var if new var is empty diff --git a/roles/sap_ha_pacemaker_cluster/vars/RedHat.yml b/roles/sap_ha_pacemaker_cluster/vars/RedHat.yml index e9dd9762d..967a2b993 100644 --- a/roles/sap_ha_pacemaker_cluster/vars/RedHat.yml +++ b/roles/sap_ha_pacemaker_cluster/vars/RedHat.yml @@ -158,4 +158,5 @@ sap_ha_pacemaker_cluster_hana_hook_chksrv: true # Central Services Cluster Simple Mount: Enabled as default # TODO: Enable when SAPStartSrv resource agents are available on Red Hat -sap_ha_pacemaker_cluster_nwas_cs_ers_simple_mount: false +sap_ha_pacemaker_cluster_nwas_cs_ers_simple_mount: true +__sap_ha_pacemaker_cluster_nwas_simple_mount_version: 4.15.1 From 57f3d04ca3aaa85fefd40f962a0b1bf349a0a8e5 Mon Sep 17 00:00:00 2001 From: Janine Fuchs Date: Wed, 15 Jan 2025 09:49:48 +0100 Subject: [PATCH 37/38] sap_ha_pacemaker_cluster: use internal var for RHEL Simple-Mount override - the internal var must be used for the decision after auto-discovery, because otherwise it can be overridden by the user (issue: command-line extra-vars take precedence over set_fact) - the pre-steps were moved to the end of the including file in order to override the internal var after its default was set --- .../tasks/RedHat/pre_steps_nwas_ascs_ers.yml | 2 +- .../tasks/include_vars_nwas.yml | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/roles/sap_ha_pacemaker_cluster/tasks/RedHat/pre_steps_nwas_ascs_ers.yml b/roles/sap_ha_pacemaker_cluster/tasks/RedHat/pre_steps_nwas_ascs_ers.yml index 71ecb9227..cd8cab36d 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/RedHat/pre_steps_nwas_ascs_ers.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/RedHat/pre_steps_nwas_ascs_ers.yml @@ -16,7 +16,7 @@ - name: "SAP HA Prepare Pacemaker - Disable Simple Mount when min. package version is not available" ansible.builtin.set_fact: - sap_ha_pacemaker_cluster_nwas_cs_ers_simple_mount: false + __sap_ha_pacemaker_cluster_nwas_cs_ers_simple_mount: false when: - sap_ha_pacemaker_cluster_nwas_cs_ers_simple_mount | bool - __sap_ha_pacemaker_cluster_sapstartsrv_check.stdout is defined diff --git a/roles/sap_ha_pacemaker_cluster/tasks/include_vars_nwas.yml b/roles/sap_ha_pacemaker_cluster/tasks/include_vars_nwas.yml index 0759f9e79..0e43e5c5b 100644 --- a/roles/sap_ha_pacemaker_cluster/tasks/include_vars_nwas.yml +++ b/roles/sap_ha_pacemaker_cluster/tasks/include_vars_nwas.yml @@ -13,13 +13,6 @@ when: - "(role_path + '/vars/' + include_item + '.yml') is file" -- name: "SAP HA Prepare Pacemaker - Run NETWEAVER pre-steps" - ansible.builtin.include_tasks: - file: "{{ ansible_facts['os_family'] }}/pre_steps_nwas_ascs_ers.yml" - when: - - ansible_os_family == 'RedHat' - - sap_ha_pacemaker_cluster_host_type | select('search', 'nwas') | length > 0 - # Private variables are assigned following logic: # 1. Use backwards compatible var if new var is empty # 2. Use user input if new var is not empty @@ -397,3 +390,13 @@ # TODO: Remove backwards compatibility to typo __sap_ha_pacemaker_cluster_storage_nfs_filesystem_type: "{{ sap_ha_pacemaker_cluster_storage_nfs_filesytem_type | d(sap_ha_pacemaker_cluster_storage_nfs_filesystem_type) }}" + +# This must be run after the assignment of +# __sap_ha_pacemaker_cluster_nwas_cs_ers_simple_mount +# TODO: separate pre-steps from variable includes for NW and HANA +- name: "SAP HA Prepare Pacemaker - Run NETWEAVER pre-steps" + ansible.builtin.include_tasks: + file: "{{ ansible_facts['os_family'] }}/pre_steps_nwas_ascs_ers.yml" + when: + - ansible_os_family == 'RedHat' + - sap_ha_pacemaker_cluster_host_type | select('search', 'nwas') | length > 0 From cbd7ecb46b6794b4ac108aee4e3243796a0de22a Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Wed, 15 Jan 2025 10:15:55 +0100 Subject: [PATCH 38/38] collection: prepare for v1.5.1 Signed-off-by: Bernd Finger --- CHANGELOG.rst | 24 ++++++++++++++++++++++++ changelogs/changelog.yaml | 17 +++++++++++++++++ galaxy.yml | 2 +- 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 5191af6dd..749c4fee4 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,30 @@ community.sap_install Release Notes .. contents:: Topics +1.5.1 +Release Summary +--------------- +- Release Date: 2025-01-15 + +This is a bugfix release of the `community.sap_install` collection. + +Minor Changes +------------- +- sap_ha_pacemaker_cluster: enable Simple Mount on RHEL (https://github.com/sap-linuxlab/community.sap_install/pull/931) +- sap_ha_pacemaker_cluster/SUSE: Rework SAPHanaSR-angi pre-steps and add SLES 16 vars (https://github.com/sap-linuxlab/community.sap_install/pull/928) +- sap_swpm, sap_general_preconfigure: Add variables for sap_install FQCN collection name for calling roles (https://github.com/sap-linuxlab/community.sap_install/pull/925) +- sap_general_preconfigure: Implement SAP note 2369910 (https://github.com/sap-linuxlab/community.sap_install/pull/914) +- sap_ha_pacemaker_cluster: ANGI on RHEL and small improvements (https://github.com/sap-linuxlab/community.sap_install/pull/911) +- sap_*_preconfigure, sap_ha_pacemaker_cluster: Reworked loading vars (https://github.com/sap-linuxlab/community.sap_install/pull/910) + +Bugfixes +-------- +- sap_swpm: Use master password only when necessary (https://github.com/sap-linuxlab/community.sap_install/pull/920) +- sap_swpm: Fix error when using tag sap_swpm_generate_inifile (https://github.com/sap-linuxlab/community.sap_install/pull/918) +- sap_swpm: Fix error when installing SAP NW750 JAVA or SOLMAN72SR2 JAVA instances (https://github.com/sap-linuxlab/community.sap_install/pull/916) +- sap_install_media_detect: Fix wrong sap_export_solman_java detection (https://github.com/sap-linuxlab/community.sap_install/pull/913) + + v1.5.0 ====== diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index b81cefc31..2b6cad3c1 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -273,3 +273,20 @@ releases: - sap_ha_install_anydb_ibmdb2: Linting and sles bug fixes (https://github.com/sap-linuxlab/community.sap_install/pull/803) ' release_date: '2024-11-29' + 1.5.1: + changes: + release_summary: '| Release Date: 2025-01-15 + minor_changes: + - sap_ha_pacemaker_cluster: enable Simple Mount on RHEL (https://github.com/sap-linuxlab/community.sap_install/pull/931) + - sap_ha_pacemaker_cluster/SUSE: Rework SAPHanaSR-angi pre-steps and add SLES 16 vars (https://github.com/sap-linuxlab/community.sap_install/pull/928) + - sap_swpm, sap_general_preconfigure: Add variables for sap_install FQCN collection name for calling roles (https://github.com/sap-linuxlab/community.sap_install/pull/925) + - sap_general_preconfigure: Implement SAP note 2369910 (https://github.com/sap-linuxlab/community.sap_install/pull/914) + - sap_ha_pacemaker_cluster: ANGI on RHEL and small improvements (https://github.com/sap-linuxlab/community.sap_install/pull/911) + - sap_*_preconfigure, sap_ha_pacemaker_cluster: Reworked loading vars (https://github.com/sap-linuxlab/community.sap_install/pull/910) + bugfixes: + - sap_swpm: Use master password only when necessary (https://github.com/sap-linuxlab/community.sap_install/pull/920) + - sap_swpm: Fix error when using tag sap_swpm_generate_inifile (https://github.com/sap-linuxlab/community.sap_install/pull/918) + - sap_swpm: Fix error when installing SAP NW750 JAVA or SOLMAN72SR2 JAVA instances (https://github.com/sap-linuxlab/community.sap_install/pull/916) + - 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' diff --git a/galaxy.yml b/galaxy.yml index bb5e3566f..c32a16517 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -11,7 +11,7 @@ namespace: community name: sap_install # The version of the collection. Must be compatible with semantic versioning -version: 1.5.0 +version: 1.5.1 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: README.md