Add some getting started documentation

This commit is contained in:
R Tyler Croy 2021-01-01 10:47:07 -08:00
parent 56683f2288
commit 3ae98839c7
1 changed files with 45 additions and 0 deletions

View File

@ -12,6 +12,51 @@ 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.
== Getting Started
Zap is still very early in its development, but if you would like to give it a
try you can install it via Rust's `cargo` command: `cargo install zap-cli`.
[source,bash]
----
cargo install zap-cli
mkdir my-zap-project
cd my-zap-project
wget https://github.com/rtyler/zap/archive/v0.1.0.tar.gz
tar -zxvf v0.1.0.tar.gz zap-0.1.0/tasks -C tasks --strip=1
cat > hello.zplan <<EOF
task 'tasks/echo.ztask' {
msg = 'Show them my medal Kif'
}
EOF
----
You will also need to create an inventory file.
.Example inventory.yml
[source,yaml]
----
groups: []
targets:
- name: alpha
uri: 192.168.1.1
config:
ssh:
user: root
password: root
config:
transport: ssh
----
Once this has been set up, you can run:
[source,bash]
----
zap plan hello.zplan -t alpha --dry-run
----
== Examples
[source]