From 94dd3b4d99a67679adcc3a9921f9e1fa78783cba Mon Sep 17 00:00:00 2001 From: elijah Date: Sun, 21 Oct 2012 16:17:05 -0700 Subject: added command init-node --- lib/leap_cli/commands/compile.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib/leap_cli/commands/compile.rb') 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 -- cgit v1.2.3