Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(BKR-1423) Pick up Vagrant config for rsync #1634

Merged
merged 1 commit into from
Mar 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions lib/beaker/host.rb
Original file line number Diff line number Diff line change
Expand Up @@ -547,8 +547,17 @@ def do_rsync_to from_path, to_path, opts = {}

# vagrant uses temporary ssh configs in order to use dynamic keys
# without this config option using ssh may prompt for password
if ssh_opts[:config] and File.exists?(ssh_opts[:config])
ssh_args << "-F #{ssh_opts[:config]}"
#
# We still want any user-set SSH config to win though
filesystem_ssh_config = nil
if ssh_opts[:config] && File.exists?(ssh_opts[:config])
filesystem_ssh_config = ssh_opts[:config]
elsif self[:vagrant_ssh_config] && File.exists?(self[:vagrant_ssh_config])
filesystem_ssh_config = self[:vagrant_ssh_config]
end

if filesystem_ssh_config
ssh_args << "-F #{filesystem_ssh_config}"
else
if ssh_opts.has_key?('keys') and
ssh_opts.has_key?('auth_methods') and
Expand Down