Executing shell script on remote machine not working

Exactly the case.

Also, if you want to use any shell keywords, you’ll also want to switch to “shell: /usr/bin/foo” because “command” does not run through the shell.

For instance, “&&” would not have worked without the shell.