diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/leap_cli/config/manager.rb | 5 | ||||
-rw-r--r-- | lib/leap_cli/ssh/options.rb | 14 |
2 files changed, 14 insertions, 5 deletions
diff --git a/lib/leap_cli/config/manager.rb b/lib/leap_cli/config/manager.rb index aea1d322..62eaa894 100644 --- a/lib/leap_cli/config/manager.rb +++ b/lib/leap_cli/config/manager.rb @@ -387,6 +387,11 @@ module LeapCli env('_all_').tags[node_tag].node_list.add(node.name, node) end end + if node.name == 'default' || environment_names.include?(node.name) + LeapCli::Util.bail! do + LeapCli.log :error, "The node name '#{node.name}' is invalid, because there is an environment with that same name." + end + end elsif !options[:include_disabled] LeapCli.log 2, :skipping, "disabled node #{name}." env.nodes.delete(name) diff --git a/lib/leap_cli/ssh/options.rb b/lib/leap_cli/ssh/options.rb index d991cc29..b8266d11 100644 --- a/lib/leap_cli/ssh/options.rb +++ b/lib/leap_cli/ssh/options.rb @@ -6,6 +6,11 @@ module LeapCli module SSH module Options + # + # options passed to net-ssh. See + # https://net-ssh.github.io/net-ssh/Net/SSH.html#method-c-start + # for the available options. + # def self.global_options { #:keys_only => true, @@ -78,13 +83,12 @@ module LeapCli def self.net_ssh_log_level if DEBUG case LeapCli.logger.log_level - when 1 then 3 - when 2 then 2 - when 3 then 1 - else 0 + when 1 then :error + when 2 then :info + else :debug end else - nil + :fatal end end |