Sha256: 26c1442a115b1bc74c0f38db21311b1e7bbc460757ae4f37444c4ec213df40c0

Contents?: true

Size: 996 Bytes

Versions: 1

Compression:

Stored size: 996 Bytes

Contents

require 'vagrant'
require 'vagrant-hosts'
require 'vagrant-hosts/version'

class VagrantHosts::Plugin < Vagrant.plugin(2)
  name 'hosts'

  description <<-DESC
  This plugin adds commands and provisioners to manage static host entries on
  Vagrant guests.
  DESC

  config(:hosts, :provisioner) do
    require_relative 'config'
    VagrantHosts::Config
  end

  provisioner(:hosts) do
    require_relative 'provisioner/hosts'
    VagrantHosts::Provisioner::Hosts
  end

  # Guest capabilities for vagrant-hosts

  [:darwin, :linux, :solaris].each do |os|
    guest_capability(os, 'sync_hosts') do
      require_relative 'cap'
      VagrantHosts::Cap::SyncHosts::POSIX
    end
  end

  guest_capability(:windows, 'sync_hosts') do
    require_relative 'cap'
    VagrantHosts::Cap::SyncHosts::Windows
  end

  command(:hosts) do
    require_relative 'command'
    VagrantHosts::Command
  end

  # ConfigBuilder tie-ins

  def self.config_builder_hook
    require_relative 'config_builder'
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vagrant-hosts-2.2.0 lib/vagrant-hosts/plugin.rb