vagrant-lxc-ng/lib/vagrant-lxc/plugin.rb

52 lines
1.1 KiB
Ruby
Raw Normal View History

require 'vagrant'
module Vagrant
module LXC
class Plugin < Vagrant.plugin("2")
name "vagrant-lxc"
description <<-EOF
The LXC provider allows Vagrant to manage and control
LXC-based virtual machines.
EOF
provider(:lxc, parallel: true, priority: 7) do
require_relative 'provider'
2016-10-20 10:39:33 +00:00
init!
Provider
end
command "lxc" do
require_relative 'command/root'
2016-10-20 10:39:33 +00:00
init!
Command::Root
end
config(:lxc, :provider) do
require_relative 'config'
2016-10-20 10:39:33 +00:00
init!
Config
end
2015-01-08 01:42:07 +00:00
synced_folder(:lxc) do
require_relative 'synced_folder'
2015-01-08 01:42:07 +00:00
SyncedFolder
end
2015-01-08 01:42:07 +00:00
provider_capability("lxc", "public_address") do
require_relative "provider/cap/public_address"
Provider::Cap::PublicAddress
end
2016-10-20 10:39:33 +00:00
protected
def self.init!
return if defined?(@_init)
I18n.load_path << File.expand_path(File.dirname(__FILE__) + '/../../locales/en.yml')
I18n.reload!
@_init = true
end
end
end
end