diff --git a/plugins/provisioners/chef/plugin.rb b/plugins/provisioners/chef/plugin.rb index b7327d702..d4a8bd69c 100644 --- a/plugins/provisioners/chef/plugin.rb +++ b/plugins/provisioners/chef/plugin.rb @@ -2,11 +2,6 @@ require "vagrant" module VagrantPlugins module Chef - module Provisioner - autoload :ChefSolo, File.expand_path("../provisioner/chef_solo", __FILE__) - autoload :ChefClient, File.expand_path("../provisioner/chef_client", __FILE__) - end - class Plugin < Vagrant.plugin("1") name "chef" description <<-DESC @@ -14,8 +9,15 @@ module VagrantPlugins Chef via `chef-solo` or `chef-client`. DESC - provisioner("chef_solo") { Provisioner::ChefSolo } - provisioner("chef_client") { Provisioner::ChefClient } + provisioner("chef_solo") do + require File.expand_path("../provisioner/chef_solo", __FILE__) + Provisioner::ChefSolo + end + + provisioner("chef_client") do + require File.expand_path("../provisioner/chef_client", __FILE__) + Provisioner::ChefClient + end end end end diff --git a/plugins/provisioners/puppet/plugin.rb b/plugins/provisioners/puppet/plugin.rb index 560ba7dad..c47c62061 100644 --- a/plugins/provisioners/puppet/plugin.rb +++ b/plugins/provisioners/puppet/plugin.rb @@ -2,11 +2,6 @@ require "vagrant" module VagrantPlugins module Pupppet - module Provisioner - autoload :Puppet, File.expand_path("../provisioner/puppet", __FILE__) - autoload :PuppetServer, File.expand_path("../provisioner/puppet_server", __FILE__) - end - class Plugin < Vagrant.plugin("1") name "puppet" description <<-DESC @@ -14,8 +9,15 @@ module VagrantPlugins Puppet either using `puppet apply` or a Puppet server. DESC - provisioner("puppet") { Provisioner::Puppet } - provisioner("puppet_server") { Provisioner::PuppetServer } + provisioner("puppet") do + require File.expand_path("../provisioner/puppet", __FILE__) + Provisioner::Puppet + end + + provisioner("puppet_server") do + require File.expand_path("../provisioner/puppet_server", __FILE__) + Provisioner::PuppetServer + end end end end diff --git a/plugins/provisioners/shell/plugin.rb b/plugins/provisioners/shell/plugin.rb index d3136bf3e..a36f3ed78 100644 --- a/plugins/provisioners/shell/plugin.rb +++ b/plugins/provisioners/shell/plugin.rb @@ -2,8 +2,6 @@ require "vagrant" module VagrantPlugins module Shell - autoload :Provisioner, File.expand_path("../provisioner", __FILE__) - class Plugin < Vagrant.plugin("1") name "shell" description <<-DESC @@ -11,7 +9,10 @@ module VagrantPlugins shell scripts. DESC - provisioner("shell") { Provisioner } + provisioner("shell") do + require File.expand_path("../provisioner", __FILE__) + Provisioner + end end end end