2014-04-12 22:00:28 +00:00
|
|
|
require "pathname"
|
|
|
|
|
2012-04-19 04:53:19 +00:00
|
|
|
require "vagrant"
|
|
|
|
|
2014-10-30 15:21:56 +00:00
|
|
|
require_relative "command_builder"
|
|
|
|
|
2012-04-19 04:53:19 +00:00
|
|
|
module VagrantPlugins
|
|
|
|
module Chef
|
2012-11-07 05:21:36 +00:00
|
|
|
class Plugin < Vagrant.plugin("2")
|
2012-04-19 04:53:19 +00:00
|
|
|
name "chef"
|
|
|
|
description <<-DESC
|
|
|
|
Provides support for provisioning your virtual machines with
|
|
|
|
Chef via `chef-solo` or `chef-client`.
|
|
|
|
DESC
|
|
|
|
|
2013-01-14 00:41:32 +00:00
|
|
|
config(:chef_solo, :provisioner) do
|
2014-10-30 15:21:56 +00:00
|
|
|
require_relative "config/chef_solo"
|
2013-01-14 00:41:32 +00:00
|
|
|
Config::ChefSolo
|
|
|
|
end
|
|
|
|
|
|
|
|
config(:chef_client, :provisioner) do
|
2014-10-30 15:21:56 +00:00
|
|
|
require_relative "config/chef_client"
|
2013-01-14 00:41:32 +00:00
|
|
|
Config::ChefClient
|
|
|
|
end
|
|
|
|
|
2014-05-19 21:05:46 +00:00
|
|
|
config(:chef_zero, :provisioner) do
|
2014-10-30 15:21:56 +00:00
|
|
|
require_relative "config/chef_zero"
|
2014-05-19 21:05:46 +00:00
|
|
|
Config::ChefZero
|
|
|
|
end
|
|
|
|
|
2013-01-14 00:41:32 +00:00
|
|
|
provisioner(:chef_solo) do
|
2014-10-30 15:21:56 +00:00
|
|
|
require_relative "provisioner/chef_solo"
|
2012-05-23 23:07:08 +00:00
|
|
|
Provisioner::ChefSolo
|
|
|
|
end
|
|
|
|
|
2013-01-14 00:41:32 +00:00
|
|
|
provisioner(:chef_client) do
|
2014-10-30 15:21:56 +00:00
|
|
|
require_relative "provisioner/chef_client"
|
2012-05-23 23:07:08 +00:00
|
|
|
Provisioner::ChefClient
|
|
|
|
end
|
2014-05-19 21:05:46 +00:00
|
|
|
|
|
|
|
provisioner(:chef_zero) do
|
2014-10-30 15:21:56 +00:00
|
|
|
require_relative "provisioner/chef_zero"
|
2014-05-19 21:05:46 +00:00
|
|
|
Provisioner::ChefZero
|
|
|
|
end
|
2012-04-19 04:53:19 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|