diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 3355a01d..97538d1f 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -36,11 +36,11 @@ cdist-dir push "$__cdist_target_host" "${__cdist_helper_dir}" "${__cdist_remote_ scp "$(which cdist-config)" \ "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_helper_dir}" -exit 2 - # Execute explorer cdist-explorer-run-init "$__cdist_target_host" "$__cdist_out_explorer_dir" +exit 2 + cdist-manifest-init "$__cdist_target_host" "$__cdist_out_object_dir" cdist-manifest-run-all "$__cdist_target_host" "$__cdist_out_object_dir" cdist-object-explorer-all "$__cdist_target_host" "$__cdist_out_object_dir" diff --git a/bin/cdist-explorer-run b/bin/cdist-explorer-run index dd0886e0..5654e084 100755 --- a/bin/cdist-explorer-run +++ b/bin/cdist-explorer-run @@ -30,42 +30,6 @@ fi set -ue __cdist_target_host="$1"; shift -__cdist_remote_src_dir="$1"; shift -__cdist_remote_dst_dir="$1"; shift -# Create remote destination directory ssh "${__cdist_remote_user}@${__cdist_target_host}" \ - "mkdir -p \"${__cdist_remote_dst_dir}\"" - -# FIXME: enable -q as soon as the code is cleaned up -cd "${__cdist_local_src_dir}" - -# Ensure there is at least one explorer -num="$(ls -1 | wc -l)" -if [ "$num" -lt 1 ]; then - __cdist_exit_err "${__cdist_local_src_dir}: Contains no explorers" -fi - -# Execute all explorers -for explorer in *; do - if [ -f "$explorer" ]; then - if [ ! -x "$explorer" ]; then - echo "Explorer \"$explorer\" exists, but is not executable." - continue - fi - - # Execute explorers and save results in remote destination directory - ssh "${__cdist_remote_user}@${__cdist_target_host}" \ - "cd \"${__cdist_remote_src_dir}\" && \"./$explorer\" > \ - \"${__cdist_remote_dst_dir}/${explorer}\"" "$@" - else - if [ -e "$explorer" ]; then - echo "Explorer \"$explorer\" exists, but is not a file." - continue - fi - fi -done - -# Copy results back to us -scp "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_dst_dir}/*" \ - "$__cdist_local_dst_dir" + "${__cdist_remote_helper_dir}/cdist-explorer-remote-run" "$@" diff --git a/conf/helper/cdist-explorer-remote-run b/conf/helper/cdist-explorer-remote-run index e2eb1e58..a04b0057 100755 --- a/conf/helper/cdist-explorer-remote-run +++ b/conf/helper/cdist-explorer-remote-run @@ -35,6 +35,7 @@ __cdist_explorer_dir="$1"; shift __cdist_my_out_dir="$1"; shift cd "${__cdist_work_dir}" +mkdir -p "$__cdist_my_out_dir" # Ensure there is at least one explorer num="$(ls -1 "$__cdist_explorer_dir" | wc -l)"