summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-10-22 00:20:16 +0200
committertv <tv@shackspace.de>2015-10-22 00:22:30 +0200
commitfc64fd18cb8677f08d038a086de879fd69f89b8c (patch)
tree13823bf6fbc6acf50dd794a2a845bbe951c7a030
parent5206c11026245b1fe20a66fb5b14165e51195f0b (diff)
krebs.*: make StrictHostKeyChecking configurable
-rw-r--r--default.nix5
-rw-r--r--krebs/default.nix6
2 files changed, 8 insertions, 3 deletions
diff --git a/default.nix b/default.nix
index fc322cb80..b261e51e7 100644
--- a/default.nix
+++ b/default.nix
@@ -17,7 +17,8 @@
{ current-date ? abort "current-date not defined"
, current-host-name ? abort "current-host-name not defined"
, current-user-name ? builtins.getEnv "LOGNAME"
-}@current:
+, StrictHostKeyChecking ? "yes"
+}@args:
let stockholm = {
# The generated scripts to deploy (or infest) systems can be found in the
@@ -47,7 +48,7 @@ let stockholm = {
inherit pkgs;
};
- krebs = import ./krebs (current // { inherit lib stockholm; });
+ krebs = import ./krebs (args // { inherit lib stockholm; });
lib =
let
diff --git a/krebs/default.nix b/krebs/default.nix
index 0b055cd24..08de72294 100644
--- a/krebs/default.nix
+++ b/krebs/default.nix
@@ -3,6 +3,7 @@
, current-user-name
, lib
, stockholm
+, StrictHostKeyChecking ? "yes"
}:
let out = {
@@ -260,7 +261,10 @@ let out = {
in out;
rootssh = target: script:
- "ssh root@${target} -T ${doc ''
+ let
+ flags = "-o StrictHostKeyChecking=${StrictHostKeyChecking}";
+ in
+ "ssh ${flags} root@${target} -T ${doc ''
set -efu
${script}
''}";