diff --git a/bin/cdist-config b/bin/cdist-config
index 9cd3a53c..393a963b 100755
--- a/bin/cdist-config
+++ b/bin/cdist-config
@@ -55,6 +55,7 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname"
: ${__cdist_name_manifest:=manifest}
: ${__cdist_name_object:=object}
: ${__cdist_name_object_finished:=done}
+: ${__cdist_name_object_processed:=processed}
: ${__cdist_name_object_id:=object_id}
: ${__cdist_name_object_source:=source}
: ${__cdist_name_objects_created:=.objects_created}
@@ -194,6 +195,11 @@ __cdist_object_code()
echo "$(__cdist_object_dir "$1")/${__cdist_name_code}"
}
+__cdist_object_processed()
+{
+ echo "$(__cdist_object_dir "$1")/${__cdist_name_object_processed}"
+}
+
__cdist_object_finished()
{
echo "$(__cdist_object_dir "$1")/${__cdist_name_object_finished}"
diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to
index e44ceff4..aeae3b6c 100755
--- a/bin/cdist-deploy-to
+++ b/bin/cdist-deploy-to
@@ -49,7 +49,8 @@ cdist-dir push "$__cdist_target_host" "${__cdist_abs_mydir}" "${__cdist_remote_b
cdist-explorer-run-global "$__cdist_target_host"
cdist-manifest-run-init "$__cdist_target_host"
-cdist-object-run-all "$__cdist_target_host"
+cdist-object-all "$__cdist_target_host" cdist-object-process
+cdist-object-all "$__cdist_target_host" cdist-object-run
cdist-cache "$__cdist_target_host"
echo "cdist $__cdist_version: Successfully finished run on $__cdist_target_host"
diff --git a/bin/cdist-object-run-all b/bin/cdist-object-all
similarity index 88%
rename from bin/cdist-object-run-all
rename to bin/cdist-object-all
index c646ab16..28df0613 100755
--- a/bin/cdist-object-run-all
+++ b/bin/cdist-object-all
@@ -19,14 +19,15 @@
# along with cdist. If not, see .
#
#
-# Run cdist-object-run for each created object.
+# Run the given command for each created object.
#
. cdist-config
-[ $# -eq 1 ] || __cdist_usage ""
+[ $# -eq 2 ] || __cdist_usage ""
set -eu
__cdist_target_host="$1"; shift
+__cdist_command="$1"; shift
__cdist_objects="$__cdist_tmp_dir/objects"
@@ -47,7 +48,6 @@ while [ -f "$__cdist_objects_created" ]; do
while [ $# -gt 0 ]; do
__cdist_object="$1"; shift
- # Process the object
- cdist-object-run "$__cdist_target_host" "$__cdist_object"
+ $__cdist_command "$__cdist_target_host" "$__cdist_object"
done
done
diff --git a/bin/cdist-object-process b/bin/cdist-object-process
new file mode 100755
index 00000000..371f3737
--- /dev/null
+++ b/bin/cdist-object-process
@@ -0,0 +1,48 @@
+#!/bin/sh
+#
+# 2011 Nico Schottelius (nico-cdist at schottelius.org)
+# 2011 Steven Armstrong (steven-cdist at armstrong.cc)
+#
+# This file is part of cdist.
+#
+# cdist is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# cdist is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with cdist. If not, see .
+#
+#
+# For the given object:
+# - run type explorers
+# - run type manifest
+#
+
+. cdist-config
+[ $# -eq 2 ] || __cdist_usage "