raw module - run background tasks on remote machine (using nohup and &)

I wanted to execute shell command on remote machine but in background using nohup and & like below -

  • raw: “nohup touch /tmp/hello.txt &”

It is not working. It works if it is executed without nohup and &. Any suggestions would be helpful here.

Note: I will not be able to make use of any other module as python2 is not installed on remote machine and no internet connection on remote machine.

Thanks

The & is a ‘shellism’, which raw module does not support, use ‘shell’ module instead, though i really recommend you set it up as a service instead.

Does shell module work without python2.7 installed at remote machine?

Thanks & Regards,
Sourav

no