Commit acb01f57 authored by Dimitris Aragiorgis's avatar Dimitris Aragiorgis
Browse files

deploy: Fix case where node doesn't have authorized_keys

Since we are inserting ssh keys, we first backup existing
authorized_keys and append them later to our uploaded file.

If authorized_keys did not exist, neither will authorized_keys.bak .
So `test -e` in the initialize method of SSH component will
fail and fabric will abort. Here we fix this case.
Signed-off-by: default avatarDimitris Aragiorgis <>
parent e11537cd
......@@ -106,7 +106,7 @@ class SSH(SynnefoComponent):
def initialize(self):
f = "/root/.ssh/authorized_keys"
return [
"test -e {0}.bak && cat {0}.bak >> {0}".format(f)
"test -e {0}.bak && cat {0}.bak >> {0} || true".format(f)
def test(self):
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