Commit Graph

16 Commits

Author SHA1 Message Date
R Tyler Croy 443b7f878d Document built-in step
Only one at the moment
2021-01-01 20:44:22 -08:00
R Tyler Croy 4888aa9ecf Make the .ztask suffix not required when loading in the zplan
Fixes #3
2021-01-01 14:41:42 -08:00
R Tyler Croy a3d6980f71 Update readme for new version 2021-01-01 11:37:36 -08:00
R Tyler Croy 6e0c76dd70 Add disconnect to the Transport trait to allow groups to be properly run
Since I refactored a Transport to allow for maintaining a connection, subsequent
commands were being run on the same target. This ensures that when a group is
being run, that the session is flushed between connections
2021-01-01 11:13:07 -08:00
R Tyler Croy 3ae98839c7 Add some getting started documentation 2021-01-01 10:47:07 -08:00
R Tyler Croy d605bc4229 Support the `unless` parameter on a task to run a little script for idempotency 2020-12-31 22:42:23 -08:00
R Tyler Croy 59d44d7e0f Tweak the readme a bit to include recent syntax changes 2020-12-31 14:40:08 -08:00
R Tyler Croy eda6f523a3 Major refactor to cleanly run tasks from files or inline
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
2020-12-31 13:48:07 -08:00
R Tyler Croy 865850bd64 Clean up the readme 2020-12-31 11:19:05 -08:00
R Tyler Croy fbde2ed863 Implement the execution of plans via the CLI 2020-12-31 11:10:12 -08:00
R Tyler Croy 8981370222 Refactoring the parsing code a fair bit to make way for the zplan parser
Turns out that a single module using #[derive(Parser)] cannot have two parsers
in the same module
2020-12-31 09:48:39 -08:00
R Tyler Croy a7efcc6085 Switch ztasks to be file-based
Played around with using symbols, and figuring out the namespacing is going to
be too much of a pain in the ass
2020-12-31 09:30:04 -08:00
R Tyler Croy 904bf007ce Start working on the task definition parsing grammar, pretty easy. 2020-12-30 14:27:33 -08:00
R Tyler Croy 97ae0d52a6 Add more sketches 2020-12-30 09:43:02 -08:00
R Tyler Croy 0bdd2ba9bc Add some sketches of what tasks and plans might look like 2020-12-29 22:16:52 -08:00
R Tyler Croy b66d6824bc Play around with simple SSH commands 2020-12-28 22:12:45 -08:00