aboutsummaryrefslogtreecommitdiff
path: root/lib/main.bash
diff options
context:
space:
mode:
Diffstat (limited to 'lib/main.bash')
-rw-r--r--lib/main.bash17
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/main.bash b/lib/main.bash
index db5832e..821c2d2 100644
--- a/lib/main.bash
+++ b/lib/main.bash
@@ -86,8 +86,10 @@ Usage:
$BASHTARD_NAME ssh <command>
$BASHTARD_NAME sync [playbook]
$BASHTARD_NAME sysinfo
+ $BASHTARD_NAME top
$BASHTARD_NAME var [-p <playbook>] <key>
$BASHTARD_NAME var [-s] <key> <value>
+ $BASHTARD_NAME zap <playbook>
Perform maintenance on your infra.
@@ -102,7 +104,10 @@ Commands:
sync Pull latest changes through git, and synchronize all added
playbooks.
sysinfo Show gathered information about this system.
+ top Show resource information about all known hosts.
var Show or set the value of a given configuration key.
+ zap Remove a playbook from the registry without attempting to run
+ the delete step from the playbook.
EOF
if [[ ! -d "$BASHTARD_ETCDIR/playbooks.d" ]]
@@ -133,9 +138,19 @@ EOF
# Render playbook descriptions
for playbook in "${playbooks[@]}"
do
+ local description=""
+
+ if [[ -f "$playbook/description.txt" ]]
+ then
+ description="$(cat "$playbook/description.txt")"
+ elif [[ -f "$playbook/description" ]]
+ then
+ description="$(cat "$playbook/description")"
+ fi
+
printf "\t%-${playbook_longest}s %s\n" \
"$(basename "$playbook")" \
- "$(cat "$playbook/description.txt")"
+ "$description"
done
}