forked from ungleich-public/cdist
shrink cdist-remote-code-run-all
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
42af407d3e
commit
7336499995
3 changed files with 2 additions and 12 deletions
|
@ -52,11 +52,9 @@ cdist-manifest-run-all "$__cdist_target_host"
|
||||||
cdist-object-explorer-all "$__cdist_target_host"
|
cdist-object-explorer-all "$__cdist_target_host"
|
||||||
cdist-object-gencode-all "$__cdist_target_host"
|
cdist-object-gencode-all "$__cdist_target_host"
|
||||||
|
|
||||||
# Transfer all objects including code
|
|
||||||
cdist-dir push "$__cdist_target_host" "$__cdist_out_object_dir" \
|
cdist-dir push "$__cdist_target_host" "$__cdist_out_object_dir" \
|
||||||
"${__cdist_remote_out_object_base_dir}"
|
"${__cdist_remote_out_object_base_dir}"
|
||||||
|
|
||||||
# And finally - execute the code
|
|
||||||
cdist-code-run-all "$__cdist_target_host"
|
cdist-code-run-all "$__cdist_target_host"
|
||||||
|
|
||||||
echo "cdist $__cdist_version: Successfully finished run on $__cdist_target_host"
|
echo "cdist $__cdist_version: Successfully finished run on $__cdist_target_host"
|
||||||
|
|
|
@ -30,7 +30,7 @@ __cdist_out_object_dir="$1"; shift
|
||||||
|
|
||||||
object="$1"; shift
|
object="$1"; shift
|
||||||
|
|
||||||
finished="$(__cdist_object_code_finished "$__cdist_object")"
|
finished="$(__cdist_object_code_finished "$object")"
|
||||||
code="$(__cdist_object_code "$object")"
|
code="$(__cdist_object_code "$object")"
|
||||||
require="$(__cdist_object_require "$object")"
|
require="$(__cdist_object_require "$object")"
|
||||||
|
|
||||||
|
|
|
@ -31,13 +31,5 @@ __cdist_out_object_dir="$1"; shift
|
||||||
__cdist_object_list "$__cdist_out_object_dir" > "$__cdist_tmp_file"
|
__cdist_object_list "$__cdist_out_object_dir" > "$__cdist_tmp_file"
|
||||||
|
|
||||||
while read object; do
|
while read object; do
|
||||||
code="$(__cdist_object_code "$object")"
|
cdist-remote-code-run "$__cdist_out_object_dir" "$object"
|
||||||
require="$(__cdist_object_require "$object")"
|
|
||||||
|
|
||||||
# Object code depends on others, execute them before us
|
|
||||||
if [ -f "$require" ]; then
|
|
||||||
while read requirement; do
|
|
||||||
cdist-remote-code-run "$code"
|
|
||||||
done < "$require"
|
|
||||||
fi
|
|
||||||
done < "$__cdist_tmp_file"
|
done < "$__cdist_tmp_file"
|
||||||
|
|
Loading…
Reference in a new issue