diff options
-rw-r--r-- | lib/leap_cli/commands/node.rb | 3 | ||||
-rw-r--r-- | lib/leap_cli/remote/tasks.rb | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/leap_cli/commands/node.rb b/lib/leap_cli/commands/node.rb index 7b929e0..8ebb5e8 100644 --- a/lib/leap_cli/commands/node.rb +++ b/lib/leap_cli/commands/node.rb @@ -52,13 +52,14 @@ module LeapCli; module Commands node.command :init do |init| init.switch 'echo', :desc => 'If set, passwords are visible as you type them (default is hidden)', :negatable => false init.action do |global,options,args| - assert! args.any?, 'You must specify a node-filter' + assert! args.any?, 'You must specify a FILTER' finished = [] manager.filter!(args).each_node do |node| ping_node(node) save_public_host_key(node, global) update_compiled_ssh_configs ssh_connect(node, :bootstrap => true, :echo => options[:echo]) do |ssh| + ssh.set_hostname ssh.install_authorized_keys ssh.install_prerequisites end diff --git a/lib/leap_cli/remote/tasks.rb b/lib/leap_cli/remote/tasks.rb index 4df2cee..35349ad 100644 --- a/lib/leap_cli/remote/tasks.rb +++ b/lib/leap_cli/remote/tasks.rb @@ -14,6 +14,12 @@ task :install_authorized_keys, :max_hosts => MAX_HOSTS do end end +task :set_hostname, :max_hosts => MAX_HOSTS do + leap.log :setting, "hostname" do + run "hostname $CAPISTRANO:HOST$" + end +end + task :install_prerequisites, :max_hosts => MAX_HOSTS do leap.mkdirs puppet_destination run "locale-gen" |