2014-03-11 23:37:47 +00:00
|
|
|
require 'vagrant'
|
2013-02-28 03:20:54 +00:00
|
|
|
|
|
|
|
module Vagrant
|
|
|
|
module LXC
|
|
|
|
class Plugin < Vagrant.plugin("2")
|
2013-09-12 00:16:57 +00:00
|
|
|
name "vagrant-lxc"
|
2013-02-28 03:20:54 +00:00
|
|
|
description <<-EOF
|
|
|
|
The LXC provider allows Vagrant to manage and control
|
|
|
|
LXC-based virtual machines.
|
|
|
|
EOF
|
|
|
|
|
2015-01-08 02:55:19 +00:00
|
|
|
provider(:lxc, parallel: true, priority: 7) do
|
2018-07-24 14:25:08 +00:00
|
|
|
require_relative 'provider'
|
2016-10-20 10:39:33 +00:00
|
|
|
init!
|
2013-02-28 03:20:54 +00:00
|
|
|
Provider
|
|
|
|
end
|
|
|
|
|
2014-03-21 22:38:35 +00:00
|
|
|
command "lxc" do
|
|
|
|
require_relative 'command/root'
|
2016-10-20 10:39:33 +00:00
|
|
|
init!
|
2014-03-21 22:38:35 +00:00
|
|
|
Command::Root
|
|
|
|
end
|
|
|
|
|
2013-02-28 03:20:54 +00:00
|
|
|
config(:lxc, :provider) do
|
2018-07-24 14:25:08 +00:00
|
|
|
require_relative 'config'
|
2016-10-20 10:39:33 +00:00
|
|
|
init!
|
2013-02-28 03:20:54 +00:00
|
|
|
Config
|
|
|
|
end
|
2014-03-12 13:26:14 +00:00
|
|
|
|
2015-01-08 01:42:07 +00:00
|
|
|
synced_folder(:lxc) do
|
2018-07-24 14:25:08 +00:00
|
|
|
require_relative 'synced_folder'
|
2015-01-08 01:42:07 +00:00
|
|
|
SyncedFolder
|
2014-03-12 13:26:14 +00:00
|
|
|
end
|
2014-03-12 13:27:30 +00:00
|
|
|
|
2015-01-08 01:42:07 +00:00
|
|
|
provider_capability("lxc", "public_address") do
|
|
|
|
require_relative "provider/cap/public_address"
|
|
|
|
Provider::Cap::PublicAddress
|
2014-03-12 13:27:30 +00:00
|
|
|
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
|
|
|
|
|
2013-02-28 03:20:54 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|