community.sap_install
community.sap_install copied to clipboard
sap_swpm: unhandled exception when using sap_swpm_swpm_observer_mode...
... and not defining sap_swpm_swpm_remote_access_user.
The error occurs in task SAP SWPM Pre Install - Set sapinst command. The complete error message is:
fatal: [host01]: FAILED! => msg: 'An unhandled exception occurred while templating ''{{ ''SAPINST_REMOTE_ACCESS_USER='' + sap_swpm_swpm_remote_access_user + '' SAPINST_REMOTE_ACCESS_USER_IS_TRUSTED=true'' if sap_swpm_swpm_observer_mode and sap_swpm_swpm_remote_access_user is defined and sap_swpm_swpm_remote_access_user | length > 0 else '''' }}''. Error was a <class ''ansible.errors.AnsibleError''>, original message: Unexpected templating type error occurred on ({{ ''SAPINST_REMOTE_ACCESS_USER='' + sap_swpm_swpm_remote_access_user + '' SAPINST_REMOTE_ACCESS_USER_IS_TRUSTED=true'' if sap_swpm_swpm_observer_mode and sap_swpm_swpm_remote_access_user is defined and sap_swpm_swpm_remote_access_user | length > 0 else '''' }}): object of type ''NoneType'' has no len(). object of type ''NoneType'' has no len()'
The error does not happen when sap_swpm_swpm_remote_access_user is defined, e.g. as 'root' or ''.
I have not yet been able to reproduce this issue with a simple yml test file which contains just this task.
The related PR is https://github.com/sap-linuxlab/community.sap_install/pull/749 .
The ansible version is ansible [core 2.16.7], with jinja version = 3.1.4 and python version 3.12.3
Sorry for the delay @berndfinger . I'll have a look next week.
I was able to replicate this.
I believe this is fixed in #850. Closing now.