1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
require 'vagrant'
module VagrantPlugins
module GuestAlpine
class Plugin < Vagrant.plugin('2')
name 'Alpine guest'
description 'Alpine Linux guest support.'
guest(:alpine, :linux) do
require File.expand_path('../guest', __FILE__)
Guest
end
guest_capability(:alpine, :configure_networks) do
require_relative 'cap/configure_networks'
Cap::ConfigureNetworks
end
guest_capability(:alpine, :halt) do
require_relative 'cap/halt'
Cap::Halt
end
guest_capability(:alpine, :change_host_name) do
require_relative 'cap/change_host_name'
Cap::ChangeHostName
end
guest_capability(:alpine, :nfs_client_install) do
require_relative 'cap/nfs_client'
Cap::NFSClient
end
guest_capability(:alpine, :rsync_installed) do
require_relative 'cap/rsync'
Cap::RSync
end
guest_capability(:alpine, :rsync_install) do
require_relative 'cap/rsync'
Cap::RSync
end
guest_capability(:alpine, :smb_install) do
require_relative 'cap/smb'
Cap::SMB
end
def self.check_community_plugin
plugins = Vagrant::Plugin::Manager.instance.installed_plugins
if plugins.keys.include?("vagrant-alpine")
$stderr.puts <<-EOF
WARNING: Vagrant has detected the `vagrant-alpine` plugin. This plugin's
functionality has been merged into the main Vagrant project and should be
considered deprecated. To uninstall the plugin, run the command shown below:
vagrant plugin uninstall vagrant-alpine
EOF
end
end
self.check_community_plugin
end
end
end
|