From de5520bec646a43bdb821e6b4213e9aab77d5ecd Mon Sep 17 00:00:00 2001 From: sean-freeman <1815807+sean-freeman@users.noreply.github.com> Date: Wed, 17 Jul 2024 16:10:21 +0100 Subject: [PATCH] sap_*preconfigure: edge case handling for sles pkgs --- roles/sap_hana_preconfigure/tasks/SLES/configuration.yml | 1 + roles/sap_hana_preconfigure/tasks/SLES/installation.yml | 6 ++++++ .../sap_netweaver_preconfigure/tasks/SLES/configuration.yml | 1 + 3 files changed, 8 insertions(+) diff --git a/roles/sap_hana_preconfigure/tasks/SLES/configuration.yml b/roles/sap_hana_preconfigure/tasks/SLES/configuration.yml index 30da5463d..1cc024a22 100644 --- a/roles/sap_hana_preconfigure/tasks/SLES/configuration.yml +++ b/roles/sap_hana_preconfigure/tasks/SLES/configuration.yml @@ -8,6 +8,7 @@ name: sapconf state: stopped enabled: false + when: "'sapconf' in ansible_facts.packages" - name: Make sure that sapconf and tuned are stopped and disabled ansible.builtin.command: "saptune service takeover" diff --git a/roles/sap_hana_preconfigure/tasks/SLES/installation.yml b/roles/sap_hana_preconfigure/tasks/SLES/installation.yml index e5810687a..270fe3eec 100644 --- a/roles/sap_hana_preconfigure/tasks/SLES/installation.yml +++ b/roles/sap_hana_preconfigure/tasks/SLES/installation.yml @@ -7,6 +7,12 @@ name: "*" when: sap_hana_preconfigure_update | bool +# SAP Note 2892338 +- name: Ensure package insserv-compat exists + ansible.builtin.package: + state: present + name: insserv-compat + # ----------- - name: Get contents of /etc/products.d/baseproduct ansible.builtin.stat: diff --git a/roles/sap_netweaver_preconfigure/tasks/SLES/configuration.yml b/roles/sap_netweaver_preconfigure/tasks/SLES/configuration.yml index 2dcedf5f4..5463a1100 100644 --- a/roles/sap_netweaver_preconfigure/tasks/SLES/configuration.yml +++ b/roles/sap_netweaver_preconfigure/tasks/SLES/configuration.yml @@ -8,6 +8,7 @@ name: sapconf state: stopped enabled: false + when: "'sapconf' in ansible_facts.packages" - name: Make sure that sapconf and tuned are stopped and disabled ansible.builtin.command: "saptune service takeover"