I want to execute nohup command on remote host using ansible but it didn't work

I guess the error message you got would be helpful in order to troubleshoot your problem

I guess the error message you got would be helpful in order to troubleshoot your problem

At any rate, nohup is IMHO not the correct way to start an application as a server / daemon. Even if some tutorials on the web say so. There is no control of the running application, so please use some kind of supervisor (e.g.systemd).

On top of that using the shell module is fragile and not recommended unless the command module really doesn't to the trick for you.

Regards

          Racke