Using 2 different users in one playbook

We have a playbook we’re trying to implement that will stop an Oracle database via a script, reboot the server, then restart Oracle via a script. The stop/start of Oracle needs to be run as the oracle user, and the reboot needs to be done as root.

When we run the playbook, we enter our normal user credentials that has sudo access, but when we try to switch as the oracle user in the playbook, we get “incorrect su password”.

I'm noob with ansible, but why trying su method (vs sudo) ?

Didn’t work. I get "incorrect su password " still.

Harry

Break it down into two different plays. One to stop and reboot and then a second play to restart

That seemed to take care of it. Thanks for the suggestion!

Thanks,
Harry