lib/vagrant-cloudstack/action/sync_folders.rb in vagrant-cloudstack-0.1.0 vs lib/vagrant-cloudstack/action/sync_folders.rb in vagrant-cloudstack-0.2.0
- old
+ new
@@ -55,13 +55,14 @@
env[:machine].communicate.sudo("mkdir -p '#{guestpath}'")
env[:machine].communicate.sudo(
"chown #{ssh_info[:username]} '#{guestpath}'")
# Rsync over to the guest path using the SSH info
+ private_keys = (ssh_info[:private_key_path].class == Array ? ssh_info[:private_key_path].join(",") : ssh_info[:private_key_path])
command = [
"rsync", "--verbose", "--archive", "-z",
"--exclude", ".vagrant/",
- "-e", "ssh -p #{ssh_info[:port]} -o StrictHostKeyChecking=no -i '#{ssh_info[:private_key_path]}'",
+ "-e", "ssh -p #{ssh_info[:port]} -o StrictHostKeyChecking=no -i '#{private_keys}'",
hostpath,
"#{ssh_info[:username]}@#{ssh_info[:host]}:#{guestpath}"]
# we need to fix permissions when using rsync.exe on windows, see
# http://stackoverflow.com/questions/5798807/rsync-permission-denied-created-directories-have-no-permissions