From 89964b32dd70c587f2b94ef9a4e027680ffb1274 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 8 Sep 2011 01:41:54 +0200 Subject: [PATCH] in theory, init_deploy is done Signed-off-by: Nico Schottelius --- bin/cdist | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/bin/cdist b/bin/cdist index d680eaa6..2ff2e011 100755 --- a/bin/cdist +++ b/bin/cdist @@ -59,17 +59,16 @@ def init_deploy(hostname): logger("info", "Creating clean directory structure") # Ensure there is no old stuff, neither local nor remote - run_or_fail(["echo", "rm -rf", "$__cdist_local_base_dir"]) + run_or_fail(["rm -rf", "$__cdist_local_base_dir"]) remote_run_or_fail(hostname, ["rm -rf", "${__cdist_remote_base_dir}"]) -# -# # Init base -# mkdir -p "$__cdist_local_base_dir" -# ssh "${__cdist_remote_user}@${__cdist_target_host}" \ -# "mkdir -p ${__cdist_remote_base_dir}" -# -# # Link configuraion source directory - consistent with remote -# ln -sf "$__cdist_conf_dir" "$__cdist_local_base_dir/$__cdist_name_conf_dir" + + # Create base directories + run_or_fail(["mkdir -p", "$__cdist_local_base_dir"]) + remote_run_or_fail(hostname,["mkdir -p", "${__cdist_remote_base_dir}"]) + + # Link configuraion source directory - consistent with remote + run_or_fail(["ln -sf", "$__cdist_conf_dir", "$__cdist_local_base_dir/$__cdist_name_conf_dir"]) if __name__ == "__main__":