aboutsummaryrefslogtreecommitdiff
path: root/tasks
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2020-05-27 00:07:36 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2020-05-27 00:07:36 +0200
commit2692e34e5c38537680ea3d33c762c96bb1112a0e (patch)
treec1fcf8d915e9a4a70ded11c57cd8ffc25b9d6f84 /tasks
downloadltask-2692e34e5c38537680ea3d33c762c96bb1112a0e.tar.gz
Initial
Diffstat (limited to 'tasks')
-rw-r--r--tasks/example24
1 files changed, 24 insertions, 0 deletions
diff --git a/tasks/example b/tasks/example
new file mode 100644
index 0000000..f5c8a9a
--- /dev/null
+++ b/tasks/example
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+function task_exec() {
+ whoami
+ hostname
+ uptime
+}
+
+function task_setup() {
+ # Available environment variables
+ # $ASSET_DIR
+ # $TOOL_DIR
+
+ SSH_USER=server
+ SSH_IDENTITY_FILE=$ASSET_DIR/id_rsa
+
+ TASK_ISSET="yes"
+}
+
+if [ -z $HOSTMODE ]; then
+ task_exec
+else
+ task_setup
+fi