From 8b43913366fcba329915c27e29a02bf8e89fff05 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Mar 2011 23:14:48 +0100 Subject: [PATCH] include local+remote run in bin/cdist-code-run-all Signed-off-by: Nico Schottelius --- bin/cdist-code-run-all | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/bin/cdist-code-run-all b/bin/cdist-code-run-all index 27935ee3..f435006f 100755 --- a/bin/cdist-code-run-all +++ b/bin/cdist-code-run-all @@ -18,7 +18,7 @@ # along with cdist. If not, see . # # -# Exec code on the remote side +# Exec code locally and remote # . cdist-config @@ -27,5 +27,21 @@ set -e __cdist_target_host="$1"; shift +__cdist_out_object_dir="$1"; shift + +__cdist_object_list "$__cdist_out_object_dir" > "$__cdist_tmp_file" + +while read object; do + # Code local + cdist-code-run "$__cdist_out_object_dir" "$object" "${__cdist_name_gencode_local}" + + # Code remote + cdist-run-remote "$__cdist_target_host" "cdist-code-run" \ + "${__cdist_remote_out_object_base_dir}" "${__cdist_name_gencode_remote}" +done < "$__cdist_tmp_file" + +exit 0 + +# OLD: cdist-run-remote "$__cdist_target_host" \ "cdist-remote-code-run-all" "${__cdist_remote_out_object_base_dir}"