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 <dimara@grnet.gr>
parent 666760d9
...@@ -25,3 +25,9 @@ dns = /var/lib/snf-deploy/dnsmasq ...@@ -25,3 +25,9 @@ dns = /var/lib/snf-deploy/dnsmasq
lib = /usr/lib/snf-deploy lib = /usr/lib/snf-deploy
# dir to store executed commands (to enforce sequential execution) # dir to store executed commands (to enforce sequential execution)
cmd = /var/run/snf-deploy/cmd cmd = /var/run/snf-deploy/cmd
[keys]
# 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(): ...@@ -226,7 +226,8 @@ def check_ssh():
@roles("ips") @roles("ips")
def add_keys(): def add_keys():
debug(env.host, "Adding rsa/dsa keys..") if not ast.literal_eval(env.env.key_inject):
debug(env.host, "Skipping ssh keys injection..")
try_run("mkdir -p /root/.ssh") try_run("mkdir -p /root/.ssh")
cmd = """ cmd = """
for f in $(ls /root/.ssh/*); do for f in $(ls /root/.ssh/*); do
......
...@@ -380,6 +380,10 @@ def parse_options(): ...@@ -380,6 +380,10 @@ def parse_options():
default=None, default=None,
help="Path of an existing ssh key to use") 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 # backend related options
parser.add_argument("--cluster-name", dest="cluster_name", parser.add_argument("--cluster-name", dest="cluster_name",
default="ganeti1", default="ganeti1",
......
...@@ -128,7 +128,7 @@ class Conf(object): ...@@ -128,7 +128,7 @@ class Conf(object):
files = { files = {
"nodes": ["network", "info"], "nodes": ["network", "info"],
"deploy": ["dirs", "packages"], "deploy": ["dirs", "packages", "keys"],
"vcluster": ["cluster", "image"], "vcluster": ["cluster", "image"],
"synnefo": ["cred", "synnefo", "roles"], "synnefo": ["cred", "synnefo", "roles"],
"packages": ["debian", "ganeti", "synnefo", "other"], "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