lib/rundock/builder/backend_builder.rb in rundock-1.0.8 vs lib/rundock/builder/backend_builder.rb in rundock-1.1.0
- old
+ new
@@ -40,12 +40,10 @@
@options.keys.select { |o| o.to_s =~ /(\w+)_ssh_default$/ }.each do |oo|
# no use default ssh options if local
# set unless scenario file and cli options specified and not localhost
next if localhost?
opt = oo.to_s.gsub(/_ssh_default/, '').to_sym
- if !@node_info[@nodename.to_sym][:ssh_opts][opt] && !@options[opt]
- @node_info[@nodename.to_sym][:ssh_opts][opt] = @options[oo]
- end
+ @node_info[@nodename.to_sym][:ssh_opts][opt] = @options[oo] if !@node_info[@nodename.to_sym][:ssh_opts][opt] && !@options[opt]
end
# replace cli ssh options if exists
%i[user key port ssh_config ask_password sudo].each { |o| @node_info[@nodename.to_sym][:ssh_opts][o] = @options[o] if @options[o] }