This ensures that rsync can be installed on an Alpine Linux machine where the apk cache may not be current. Display a warning if the vagrant-alpine plugin is installed, since Alpine guest support has been merged into Vagrant core.
18 lines
384 B
Ruby
18 lines
384 B
Ruby
module VagrantPlugins
|
|
module GuestAlpine
|
|
module Cap
|
|
class RSync
|
|
def self.rsync_installed(machine)
|
|
machine.communicate.test('test -f /usr/bin/rsync')
|
|
end
|
|
|
|
def self.rsync_install(machine)
|
|
machine.communicate.tap do |comm|
|
|
comm.sudo('apk add --update-cache rsync')
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|