From 2692e34e5c38537680ea3d33c762c96bb1112a0e Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Wed, 27 May 2020 00:07:36 +0200 Subject: Initial --- tasks/example | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tasks/example (limited to 'tasks/example') 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 -- cgit v1.2.3