Open woreis opened 1 week ago
It works, when the become_user attribute is omitted and I pass password instead of hdbuserstore.
@woreis Please first check the System Python versus the user Python. The Ansible Module sap_hdbsql
does not import struct, it is imported at a much lower level and without reading your updated comment - I would have said become_user
is problematic.
[root@sandbox ~]# $(which python) -c "help('modules')" | grep struct
[root@sandbox ~]# su - sbxadm
[sbxadm@sandbox ~]# $(which python) -c "help('modules')" | grep struct
Hi Sean, I found out when I omit "become_flags: '-i'" the above playbook works. But nevertheless the output of the above commands is:
[root@some.host ~]# $(which python) -c "help('modules')" | grep struct _imp datetime numbers struct _struct getpass pycparser urllib3 [root@some.host ~]# su - idhadm idhadm@vintdevhdb001.fdz:/usr/sap/IDH/HDB00> $(which python) -c "help('modules')" | grep struct _struct libhdbconssrv libhdbpreprocessorclient pipes distutils libhdbexprutils libhdbsqlscriptcodegen struct
Summary
Hi, I just wanted to test sap_hdbsql.py and immediately run into an issue.
When I run this, I get the error shown below. But of course the struct.py file can be found on the target system.
Any idea, what could cause this problem ? Help would be appreciated, Thanks, Wolfgang
Issue Type
Bug Report
Component Name
sap_libs, module sap_hdbsql.py
Ansible Version
community.sap_libs Version
Configuration
OS / Environment
RHEL 9
Steps to Reproduce
Expected Results
I expected the List of users to be shown.
Actual Results
But the file exists on the target:
Code of Conduct