Method: CloudFlock::App::Common#prepare_source_exclusions

Defined in:
lib/cloudflock/app/common/servers.rb

#prepare_source_exclusions(shell, exclusions) ⇒ Object

Public: Generate a new ssh keypair to be used for the migration.

shell - SSH object logged in to the source host. exclusions - String containing the exclusions list for the source host.

Returns a String containing the new public key.



468
469
470
471
472
473
474
475
# File 'lib/cloudflock/app/common/servers.rb', line 468

def prepare_source_exclusions(shell, exclusions)
  UI.spinner('Setting up migration exclusions') do
    shell.as_root("cat <<EOF> #{EXCLUSIONS}\n#{exclusions}\nEOF")
  end
rescue Timeout::Error
  retry_exit('Host is taking a long time to respond.')
  retry
end