summaryrefslogtreecommitdiff
path: root/lib/leap_cli/commands/compile.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/leap_cli/commands/compile.rb')
-rw-r--r--lib/leap_cli/commands/compile.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/leap_cli/commands/compile.rb b/lib/leap_cli/commands/compile.rb
index 3e9d42d..429d1c5 100644
--- a/lib/leap_cli/commands/compile.rb
+++ b/lib/leap_cli/commands/compile.rb
@@ -1,3 +1,4 @@
+
module LeapCli
module Commands
@@ -7,7 +8,17 @@ module LeapCli
manager.load(Path.provider)
ensure_dir(Path.hiera)
manager.export(Path.hiera)
+ update_authorized_keys
+ update_known_hosts
+ end
+ end
+
+ def update_authorized_keys
+ buffer = StringIO.new
+ Dir.glob(named_path(:user_ssh, '*')).each do |keyfile|
+ buffer << File.read(keyfile)
end
+ write_file!(:authorized_keys, buffer.string)
end
end