From 443b7f878d926136b82c9f00c605f02fd479d50b Mon Sep 17 00:00:00 2001 From: "R. Tyler Croy" Date: Fri, 1 Jan 2021 20:44:22 -0800 Subject: [PATCH] Document built-in step Only one at the moment --- README.adoc | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/README.adoc b/README.adoc index e56d7c5..7f772d1 100644 --- a/README.adoc +++ b/README.adoc @@ -1,3 +1,5 @@ +:toc: macro + = Zap A simple cross-platform orchestration and configuration management tool. @@ -12,6 +14,8 @@ Zap borrows ideas from link:https://puppet.com/docs/bolt/latest/bolt.html[Puppet Bolt]. but leaves some of the Puppet-based legacy from Bolt behind. +toc::[] + == Getting Started Zap is still very early in its development, but if you would like to give it a @@ -148,3 +152,41 @@ task 'tasks/echo' { } ---- + +== Built-in Tasks + +Zap comes with a number of tasks that are built into `zap` itself. These can be +referenced in the task declarations in plans via the `zap://` URL. + +=== `sh` + +The `sh` task will execute the given script via `/bin/sh` on the target. + +.Example +[source] +---- +task 'zap://sh' { + script = ''' + pwd + echo ${SHELL} + ''' +} +---- + +.Parameter +|=== +| Name | Required | Description + +| `script` +| yes +| A shell script + +| `provides` +| no +| When this file is present indicates that the script should not be re-run + +| `unless` +| no +| When this script returns zero exit status, the script should not be re-run + +|==