Commit e84191ec authored by Dimitris Aragiorgis's avatar Dimitris Aragiorgis Committed by Christos Stavrakakis
Browse files

Add --no-keys-inject option

This skips key injection in nodes
Signed-off-by: default avatarDimitris Aragiorgis <>
parent 666760d9
......@@ -25,3 +25,9 @@ dns = /var/lib/snf-deploy/dnsmasq
lib = /usr/lib/snf-deploy
# dir to store executed commands (to enforce sequential execution)
cmd = /var/run/snf-deploy/cmd
# whether to create new keys
keygen = False
# whether to inject ssh keys found in templates/root/.ssh in nodes
key_inject = True
......@@ -226,7 +226,8 @@ def check_ssh():
def add_keys():
debug(, "Adding rsa/dsa keys..")
if not ast.literal_eval(env.env.key_inject):
debug(, "Skipping ssh keys injection..")
try_run("mkdir -p /root/.ssh")
cmd = """
for f in $(ls /root/.ssh/*); do
......@@ -380,6 +380,10 @@ def parse_options():
help="Path of an existing ssh key to use")
parser.add_argument("--no-key-inject", dest="key_inject",
default=True, action="store_false",
help="Whether to inject ssh key pairs to hosts")
# backend related options
parser.add_argument("--cluster-name", dest="cluster_name",
......@@ -128,7 +128,7 @@ class Conf(object):
files = {
"nodes": ["network", "info"],
"deploy": ["dirs", "packages"],
"deploy": ["dirs", "packages", "keys"],
"vcluster": ["cluster", "image"],
"synnefo": ["cred", "synnefo", "roles"],
"packages": ["debian", "ganeti", "synnefo", "other"],
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment