Trying to run command as ubuntu user

Currently I am provisioning a VM with an ansible script that preferably mustn’t be changed. This ansible script uses the ubuntu user as the working user so when I try to run tests I need to run them as the ubuntu user how ever when I try to run the su - ubuntu command the job just hangs as if it is waiting for a user input or something. When I ssh onto the box I can switch user no problem. If anyone can help me run steps as ubuntu instead of circleci that would be awesome!