Sha256: 3366d29d2d15da60132b91069b1852d475d719730cfdf9d6f86541e01aecb56b

Contents?: true

Size: 1.89 KB

Versions: 4

Compression:

Stored size: 1.89 KB

Contents

require File.expand_path("../hosts/host", __FILE__)
require File.expand_path("../hosts/bsd/host", __FILE__)

module VagrantPlugins
  module SyncedFolderNFSGuest
    class Plugin < Vagrant.plugin("2")
      name "vagrant-nfs_guest"
      description <<-DESC
      Adds support for guest nfs exporting of synced folders
      DESC

      config(:nfs_guest) do
        require File.expand_path("../config", __FILE__)
        Config
      end

      synced_folder(:nfs_guest, 4) do
        require File.expand_path("../synced_folder", __FILE__)
        SyncedFolder
      end

      guest_capability(:linux, :export_nfs_folders) do
        require File.expand_path("../cap/linux/export_nfs_folders", __FILE__)
        Cap::Linux::ExportNFS
      end

      guest_capability(:linux, :export_nfs_capable) do
        require File.expand_path("../cap/linux/export_nfs_folders", __FILE__)
        Cap::Linux::ExportNFS
      end

      guest_capability(:linux, :read_uid) do
        require File.expand_path("../cap/linux/read_user_ids", __FILE__)
        Cap::Linux::ReadUserIDs
      end

      guest_capability(:linux, :read_gid) do
        require File.expand_path("../cap/linux/read_user_ids", __FILE__)
        Cap::Linux::ReadUserIDs
      end

      guest_capability(:linux, :halt) do
        require File.expand_path("../cap/linux/halt", __FILE__)
        Cap::Linux::Halt
      end

      require File.expand_path("../action/prepare_nfs_guest_settings", __FILE__)
      action_hook(:nfs_guest, :machine_action_up) do |hook|
        hook.before(VagrantPlugins::ProviderVirtualBox::Action::PrepareNFSSettings,
                   Action::PrepareNFSGuestSettings)
      end

      require File.expand_path("../action/unmount_mounts", __FILE__)
      action_hook(:nfs_guest, :machine_action_destroy) do |hook|
        hook.after(Vagrant::Action::Builtin::DestroyConfirm,
                   Action::UnmountMounts)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
vagrant-nfs_guest-0.0.4 lib/vagrant-nfs_guest/plugin.rb
vagrant-nfs_guest-0.0.3 lib/vagrant-nfs_guest/plugin.rb
vagrant-nfs_guest-0.0.2 lib/vagrant-nfs_guest/plugin.rb
vagrant-nfs_guest-0.0.1 lib/vagrant-nfs_guest/plugin.rb