diff --git a/roles/sap_swpm/tasks/post_install.yml b/roles/sap_swpm/tasks/post_install.yml index d26dbee2f..4e0d39968 100644 --- a/roles/sap_swpm/tasks/post_install.yml +++ b/roles/sap_swpm/tasks/post_install.yml @@ -34,7 +34,14 @@ # - ' Master Password - {{ sap_swpm_master_password }} ' # - ' DDIC 000 Password - {{ sap_swpm_ddic_000_password }} ' -- name: SAP SWPM Post Install - Enforce Connection Info in hdbuserstore +# SAP HANA Client will not be installed for any installation with SAP AnyDB +# and will only be installed alongside SAP NWAS PAS or AAS (not NWAS ASCS) +- name: SAP SWPM Post Install - Check for SAP HANA Client hdbuserstore + ansible.builtin.stat: + path: /usr/sap/{{ sap_swpm_sid }}/hdbclient/hdbuserstore + register: __sap_swpm_post_install_register_hdbuserstore_exists + +- name: SAP SWPM Post Install - Enforce Connection Info in SAP HANA Client hdbuserstore ansible.builtin.shell: | /usr/sap/{{ sap_swpm_sid }}/hdbclient/hdbuserstore \ SET DEFAULT \ @@ -44,6 +51,8 @@ executable: /bin/bash become: true become_user: "{{ sap_swpm_sid | lower }}adm" - when: sap_swpm_install_saphostagent is defined and sap_swpm_install_saphostagent + when: + - sap_swpm_install_saphostagent is defined and sap_swpm_install_saphostagent + - __sap_swpm_post_install_register_hdbuserstore_exists.stat.exists register: __sap_swpm_post_install_register_hdbuserstore_connection changed_when: __sap_swpm_post_install_register_hdbuserstore_connection is succeeded