submit variables to cdist-remote-explorer-run
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
302b6ef58c
commit
dcb9900afc
1 changed files with 13 additions and 12 deletions
|
@ -71,28 +71,29 @@ while read object; do
|
|||
done < "$object_listing"
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
object="$1"; shift
|
||||
object_id="$(__cdist_object_id_from_object "$object")"
|
||||
type="$(__cdist_type_from_object "$object")"
|
||||
__object="$1"; shift
|
||||
__object_id="$(__cdist_object_id_from_object "$__object")"
|
||||
__cdist_type="$(__cdist_type_from_object "$__object")"
|
||||
|
||||
# Always copy object parameters (looks weired if done only for the ones with explorer)
|
||||
# Really always?
|
||||
|
||||
# Check if type of object has >= 1 explorer
|
||||
has_explorer="$(__cdist_type_has_explorer "$type")"
|
||||
has_explorer="$(__cdist_type_has_explorer "$__cdist_type")"
|
||||
|
||||
# If so, run explorers on remote side
|
||||
if [ "$has_explorer" ]; then
|
||||
echo "Running explorers for $object ..."
|
||||
echo "Running explorers for $__object ..."
|
||||
cdist-run-remote "$__cdist_target_host" \
|
||||
"__object=\"$__object\" __object_id=\"$__object_id\"" \
|
||||
cdist-remote-explorer-run \
|
||||
"$__cdist_name_var_type_explorer" \
|
||||
"$(__cdist_remote_type_explorer_dir "$type")" \
|
||||
"$(__cdist_remote_object_type_explorer_dir "$object")"
|
||||
"$(__cdist_remote_type_explorer_dir "$__cdist_type")" \
|
||||
"$(__cdist_remote_object_type_explorer_dir "$__object")"
|
||||
|
||||
# Copy back results
|
||||
cdist-dir pull "$__cdist_target_host" \
|
||||
"$(__cdist_remote_object_type_explorer_dir "$object")" \
|
||||
"$(__cdist_object_type_explorer_dir "$object")"
|
||||
"$(__cdist_remote_object_type_explorer_dir "$__object")" \
|
||||
"$(__cdist_object_type_explorer_dir "$__object")"
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue