From 301163ad55a1e4e60df73b3ddb1775147ad67d9b Mon Sep 17 00:00:00 2001 From: Bernd Finger Date: Fri, 30 Aug 2024 16:59:38 +0200 Subject: [PATCH] sap_hana_install: Avoid "Missing sudo password" ... when running the hdbuserstore command. Fixes #847. Signed-off-by: Bernd Finger --- roles/sap_hana_install/tasks/post_install/hdbuserstore.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/roles/sap_hana_install/tasks/post_install/hdbuserstore.yml b/roles/sap_hana_install/tasks/post_install/hdbuserstore.yml index a4fa40e78..ca2f24503 100644 --- a/roles/sap_hana_install/tasks/post_install/hdbuserstore.yml +++ b/roles/sap_hana_install/tasks/post_install/hdbuserstore.yml @@ -3,14 +3,13 @@ - name: SAP HANA Post Install - Create and Store Connection Info in hdbuserstore ansible.builtin.shell: | - /usr/sap/{{ sap_hana_install_sid }}/SYS/exe/hdb/hdbuserstore \ + su - {{ sap_hana_install_sid | lower }}adm -c "/usr/sap/{{ sap_hana_install_sid }}/SYS/exe/hdb/hdbuserstore \ SET {{ sap_hana_install_hdbuserstore_key }} \ {{ ansible_hostname }}:3{{ sap_hana_install_number }}13 \ - SYSTEM '{{ sap_hana_install_db_system_password | d(sap_hana_install_master_password) }}' + SYSTEM '{{ sap_hana_install_db_system_password | d(sap_hana_install_master_password) }}'" args: executable: /bin/bash become: true - become_user: "{{ sap_hana_install_sid | lower }}adm" when: not ansible_check_mode changed_when: no register: __sap_hana_install_store_connection_information