Commit 95616bbb authored by Lucas Nussbaum's avatar Lucas Nussbaum

fix rubocop warnings

parent dbcbdd55
Pipeline #61974 passed with stages
in 1 minute and 39 seconds
......@@ -532,10 +532,10 @@ def oarcmd_set_disk_properties(host, disk, disk_properties)
end
# sudo exec
def ssh_exec(site_uid, cmds, _options)
def ssh_exec(cmds, options)
# The following is equivalent to : "cat cmds | bash"
#res = ""
c = Net::SSH.start(_options[:ssh][:host], _options[:ssh][:user])
c = Net::SSH.start(options[:ssh][:host], options[:ssh][:user])
c.open_channel { |channel|
channel.exec('sudo bash') { |ch, success|
# stdout
......@@ -802,7 +802,7 @@ def generate_oar_properties(options)
if options[:exec]
printf 'Apply changes to the OAR server ' + options[:ssh][:host].gsub('%s', site_uid) + ' ? (y/N) '
prompt = STDIN.gets.chomp
ssh_exec(site_uid, ssh_cmd, options) if prompt.downcase == 'y'
ssh_exec(ssh_cmd, options) if prompt.downcase == 'y'
end
end # site loop
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment