Timeout (12s) waiting for privilege escalation prompt

Hi,

Am getting “Timeout (12s) waiting for privilege escalation prompt” while using become_user: test_user.

I opened issue in github and redirected here.

https://github.com/ansible/ansible/issues/72111

sudo has been granted from linux server and manually sudo working for the user but when try to run same with ansible getting privilege escalation error.

%non_root_group ALL = NOPASSWD: /bin/su - test_user ( Manually this is working, but with ansible not working )

When grant all commands then it is working

%non_root_group ALL = NOPASSWD:ALL ( but this not my requirement, i need to limit the group run commands as above )

https://docs.ansible.com/ansible/latest/user_guide/become.html#privilege-escalation-must-be-general