aboutsummaryrefslogtreecommitdiff
path: root/tasks/example
diff options
context:
space:
mode:
Diffstat (limited to 'tasks/example')
-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