ExecutableTask needs to find a new home, and some other things still need to get
shuffled around. This commit does however copy a temp file over for execution
which seems to be the best possible scenario for safe execution
An example run:
❯ RUST_LOG=debug ./target/debug/zap task tasks/shell/bash.ztask -p "script=set -xe; pwd" -t zap-freebsd
Running task with: TaskOpts { task: "tasks/shell/bash.ztask", parameter: ["script=set -xe; pwd"], targets: "zap-freebsd" }
INFO zap > Task located, preparing to execute
DEBUG handlebars::render > Rendering value: Path(Relative(([Named("script")], "script")))
DEBUG handlebars::context > Accessing context value: AbsolutePath(["script"])
err: + pwd
/root
With some real integration testing it looks like the "set an environment
variable" approach is not really going to work effectively.
I think the script {} will need to be treated like a template instead, since
different shells require different ways of setting env variables and it doesn't
appear that there's a good ssh2-based way to set these environment variables.