From 13636097f569cd6f77d487f6a9ab91e02b079e53 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 20 Aug 2020 16:20:02 -0400 Subject: [PATCH] Add more verbosity to remote functions --- confluent_osdeploy/el7/profiles/default/scripts/functions | 4 ++++ confluent_osdeploy/el8/profiles/default/scripts/functions | 4 ++++ confluent_osdeploy/genesis/profiles/default/scripts/functions | 4 ++++ confluent_osdeploy/rhvh4/profiles/default/scripts/functions | 4 ++++ confluent_osdeploy/suse15/profiles/hpc/scripts/functions | 4 ++++ 5 files changed, 20 insertions(+) diff --git a/confluent_osdeploy/el7/profiles/default/scripts/functions b/confluent_osdeploy/el7/profiles/default/scripts/functions index 56a41eec..53f42c52 100644 --- a/confluent_osdeploy/el7/profiles/default/scripts/functions +++ b/confluent_osdeploy/el7/profiles/default/scripts/functions @@ -1,4 +1,5 @@ run_remote() { + echo Running "'$*' from https://$mgr/confluent-public/os/$profile/scripts/" cd $(mktemp -d) curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1 chmod +x $1 @@ -8,12 +9,15 @@ run_remote() { fi shift ./$cmd $* + echo "'$*' exited with code $?" cd - } run_remote_python() { + echo -n Running python script "'$*'" from https://$mgr/confluent-public/os/$profile/scripts/ cd $(mktemp -d) curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1 /usr/libexec/platform-python $* + echo "'$*' exited with code $?" cd - } diff --git a/confluent_osdeploy/el8/profiles/default/scripts/functions b/confluent_osdeploy/el8/profiles/default/scripts/functions index 56a41eec..53f42c52 100644 --- a/confluent_osdeploy/el8/profiles/default/scripts/functions +++ b/confluent_osdeploy/el8/profiles/default/scripts/functions @@ -1,4 +1,5 @@ run_remote() { + echo Running "'$*' from https://$mgr/confluent-public/os/$profile/scripts/" cd $(mktemp -d) curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1 chmod +x $1 @@ -8,12 +9,15 @@ run_remote() { fi shift ./$cmd $* + echo "'$*' exited with code $?" cd - } run_remote_python() { + echo -n Running python script "'$*'" from https://$mgr/confluent-public/os/$profile/scripts/ cd $(mktemp -d) curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1 /usr/libexec/platform-python $* + echo "'$*' exited with code $?" cd - } diff --git a/confluent_osdeploy/genesis/profiles/default/scripts/functions b/confluent_osdeploy/genesis/profiles/default/scripts/functions index 56a41eec..53f42c52 100644 --- a/confluent_osdeploy/genesis/profiles/default/scripts/functions +++ b/confluent_osdeploy/genesis/profiles/default/scripts/functions @@ -1,4 +1,5 @@ run_remote() { + echo Running "'$*' from https://$mgr/confluent-public/os/$profile/scripts/" cd $(mktemp -d) curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1 chmod +x $1 @@ -8,12 +9,15 @@ run_remote() { fi shift ./$cmd $* + echo "'$*' exited with code $?" cd - } run_remote_python() { + echo -n Running python script "'$*'" from https://$mgr/confluent-public/os/$profile/scripts/ cd $(mktemp -d) curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1 /usr/libexec/platform-python $* + echo "'$*' exited with code $?" cd - } diff --git a/confluent_osdeploy/rhvh4/profiles/default/scripts/functions b/confluent_osdeploy/rhvh4/profiles/default/scripts/functions index 56a41eec..53f42c52 100644 --- a/confluent_osdeploy/rhvh4/profiles/default/scripts/functions +++ b/confluent_osdeploy/rhvh4/profiles/default/scripts/functions @@ -1,4 +1,5 @@ run_remote() { + echo Running "'$*' from https://$mgr/confluent-public/os/$profile/scripts/" cd $(mktemp -d) curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1 chmod +x $1 @@ -8,12 +9,15 @@ run_remote() { fi shift ./$cmd $* + echo "'$*' exited with code $?" cd - } run_remote_python() { + echo -n Running python script "'$*'" from https://$mgr/confluent-public/os/$profile/scripts/ cd $(mktemp -d) curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1 /usr/libexec/platform-python $* + echo "'$*' exited with code $?" cd - } diff --git a/confluent_osdeploy/suse15/profiles/hpc/scripts/functions b/confluent_osdeploy/suse15/profiles/hpc/scripts/functions index 8794d34c..8ba8cbb3 100644 --- a/confluent_osdeploy/suse15/profiles/hpc/scripts/functions +++ b/confluent_osdeploy/suse15/profiles/hpc/scripts/functions @@ -1,16 +1,20 @@ run_remote() { + echo Running "'$*' from https://$mgr/confluent-public/os/$profile/scripts/" cd $(mktemp -d) curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1 chmod +x $1 cmd=$1 shift ./$cmd $* + echo "'$*' exited with code $?" cd - } run_remote_python() { + echo -n Running python script "'$*'" from https://$mgr/confluent-public/os/$profile/scripts/ cd $(mktemp -d) curl -f https://$mgr/confluent-public/os/$profile/scripts/$1 > $1 python3 $* + echo "'$*' exited with code $?" cd - }