From 9956e6d01238705647a4faf248f2f5233548e893 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 20 Apr 2012 16:53:01 -0700 Subject: [PATCH] Better directory structure for plugins --- lib/vagrant.rb | 30 ++++++++++++++----- .../box}/command/add.rb | 0 .../box}/command/list.rb | 0 .../box}/command/remove.rb | 0 .../box}/command/repackage.rb | 0 .../box}/command/root.rb | 0 .../{command_box => commands/box}/plugin.rb | 0 .../destroy}/command.rb | 0 .../destroy}/plugin.rb | 0 .../{command_gem => commands/gem}/command.rb | 0 .../{command_gem => commands/gem}/plugin.rb | 0 .../halt}/command.rb | 0 .../{command_halt => commands/halt}/plugin.rb | 0 .../init}/command.rb | 0 .../{command_init => commands/init}/plugin.rb | 0 .../package}/command.rb | 0 .../package}/plugin.rb | 0 .../provision}/command.rb | 0 .../provision}/plugin.rb | 0 .../reload}/command.rb | 0 .../reload}/plugin.rb | 0 .../resume}/command.rb | 0 .../resume}/plugin.rb | 0 .../{command_ssh => commands/ssh}/command.rb | 0 .../{command_ssh => commands/ssh}/plugin.rb | 0 .../ssh_config}/command.rb | 0 .../ssh_config}/plugin.rb | 0 .../status}/command.rb | 0 .../status}/plugin.rb | 0 .../suspend}/command.rb | 0 .../suspend}/plugin.rb | 0 .../{command_up => commands/up}/command.rb | 0 plugins/{command_up => commands/up}/plugin.rb | 0 .../up}/start_mixins.rb | 0 plugins/{guest_arch => guests/arch}/guest.rb | 0 plugins/{guest_arch => guests/arch}/plugin.rb | 0 .../{guest_debian => guests/debian}/guest.rb | 0 .../{guest_debian => guests/debian}/plugin.rb | 0 .../{guest_fedora => guests/fedora}/guest.rb | 0 .../{guest_fedora => guests/fedora}/plugin.rb | 0 .../freebsd}/config.rb | 0 .../freebsd}/guest.rb | 0 .../freebsd}/plugin.rb | 0 .../{guest_gentoo => guests/gentoo}/guest.rb | 0 .../{guest_gentoo => guests/gentoo}/plugin.rb | 0 .../{guest_linux => guests/linux}/config.rb | 0 .../{guest_linux => guests/linux}/guest.rb | 0 .../{guest_linux => guests/linux}/plugin.rb | 0 .../openbsd}/guest.rb | 0 .../openbsd}/plugin.rb | 0 .../{guest_redhat => guests/redhat}/guest.rb | 0 .../{guest_redhat => guests/redhat}/plugin.rb | 0 .../solaris}/config.rb | 0 .../solaris}/guest.rb | 0 .../solaris}/plugin.rb | 0 plugins/{guest_suse => guests/suse}/guest.rb | 0 plugins/{guest_suse => guests/suse}/plugin.rb | 0 .../{guest_ubuntu => guests/ubuntu}/guest.rb | 0 .../{guest_ubuntu => guests/ubuntu}/plugin.rb | 0 plugins/{host_arch => hosts/arch}/host.rb | 0 plugins/{host_arch => hosts/arch}/plugin.rb | 0 plugins/{host_bsd => hosts/bsd}/host.rb | 0 plugins/{host_bsd => hosts/bsd}/plugin.rb | 0 plugins/{host_fedora => hosts/fedora}/host.rb | 0 .../{host_fedora => hosts/fedora}/plugin.rb | 0 .../{host_freebsd => hosts/freebsd}/host.rb | 0 .../{host_freebsd => hosts/freebsd}/plugin.rb | 0 plugins/{host_gentoo => hosts/gentoo}/host.rb | 0 .../{host_gentoo => hosts/gentoo}/plugin.rb | 0 plugins/{host_linux => hosts/linux}/host.rb | 0 plugins/{host_linux => hosts/linux}/plugin.rb | 0 .../{host_opensuse => hosts/opensuse}/host.rb | 0 .../opensuse}/plugin.rb | 0 .../{host_windows => hosts/windows}/host.rb | 0 .../{host_windows => hosts/windows}/plugin.rb | 0 plugins/{ => provisioners}/chef/plugin.rb | 0 .../chef/provisioner/base.rb | 0 .../chef/provisioner/chef_client.rb | 0 .../chef/provisioner/chef_solo.rb | 0 plugins/{ => provisioners}/puppet/plugin.rb | 0 .../puppet/provisioner/puppet.rb | 0 .../puppet/provisioner/puppet_server.rb | 0 plugins/{ => provisioners}/shell/plugin.rb | 0 .../{ => provisioners}/shell/provisioner.rb | 0 84 files changed, 23 insertions(+), 7 deletions(-) rename plugins/{command_box => commands/box}/command/add.rb (100%) rename plugins/{command_box => commands/box}/command/list.rb (100%) rename plugins/{command_box => commands/box}/command/remove.rb (100%) rename plugins/{command_box => commands/box}/command/repackage.rb (100%) rename plugins/{command_box => commands/box}/command/root.rb (100%) rename plugins/{command_box => commands/box}/plugin.rb (100%) rename plugins/{command_destroy => commands/destroy}/command.rb (100%) rename plugins/{command_destroy => commands/destroy}/plugin.rb (100%) rename plugins/{command_gem => commands/gem}/command.rb (100%) rename plugins/{command_gem => commands/gem}/plugin.rb (100%) rename plugins/{command_halt => commands/halt}/command.rb (100%) rename plugins/{command_halt => commands/halt}/plugin.rb (100%) rename plugins/{command_init => commands/init}/command.rb (100%) rename plugins/{command_init => commands/init}/plugin.rb (100%) rename plugins/{command_package => commands/package}/command.rb (100%) rename plugins/{command_package => commands/package}/plugin.rb (100%) rename plugins/{command_provision => commands/provision}/command.rb (100%) rename plugins/{command_provision => commands/provision}/plugin.rb (100%) rename plugins/{command_reload => commands/reload}/command.rb (100%) rename plugins/{command_reload => commands/reload}/plugin.rb (100%) rename plugins/{command_resume => commands/resume}/command.rb (100%) rename plugins/{command_resume => commands/resume}/plugin.rb (100%) rename plugins/{command_ssh => commands/ssh}/command.rb (100%) rename plugins/{command_ssh => commands/ssh}/plugin.rb (100%) rename plugins/{command_ssh_config => commands/ssh_config}/command.rb (100%) rename plugins/{command_ssh_config => commands/ssh_config}/plugin.rb (100%) rename plugins/{command_status => commands/status}/command.rb (100%) rename plugins/{command_status => commands/status}/plugin.rb (100%) rename plugins/{command_suspend => commands/suspend}/command.rb (100%) rename plugins/{command_suspend => commands/suspend}/plugin.rb (100%) rename plugins/{command_up => commands/up}/command.rb (100%) rename plugins/{command_up => commands/up}/plugin.rb (100%) rename plugins/{command_up => commands/up}/start_mixins.rb (100%) rename plugins/{guest_arch => guests/arch}/guest.rb (100%) rename plugins/{guest_arch => guests/arch}/plugin.rb (100%) rename plugins/{guest_debian => guests/debian}/guest.rb (100%) rename plugins/{guest_debian => guests/debian}/plugin.rb (100%) rename plugins/{guest_fedora => guests/fedora}/guest.rb (100%) rename plugins/{guest_fedora => guests/fedora}/plugin.rb (100%) rename plugins/{guest_freebsd => guests/freebsd}/config.rb (100%) rename plugins/{guest_freebsd => guests/freebsd}/guest.rb (100%) rename plugins/{guest_freebsd => guests/freebsd}/plugin.rb (100%) rename plugins/{guest_gentoo => guests/gentoo}/guest.rb (100%) rename plugins/{guest_gentoo => guests/gentoo}/plugin.rb (100%) rename plugins/{guest_linux => guests/linux}/config.rb (100%) rename plugins/{guest_linux => guests/linux}/guest.rb (100%) rename plugins/{guest_linux => guests/linux}/plugin.rb (100%) rename plugins/{guest_openbsd => guests/openbsd}/guest.rb (100%) rename plugins/{guest_openbsd => guests/openbsd}/plugin.rb (100%) rename plugins/{guest_redhat => guests/redhat}/guest.rb (100%) rename plugins/{guest_redhat => guests/redhat}/plugin.rb (100%) rename plugins/{guest_solaris => guests/solaris}/config.rb (100%) rename plugins/{guest_solaris => guests/solaris}/guest.rb (100%) rename plugins/{guest_solaris => guests/solaris}/plugin.rb (100%) rename plugins/{guest_suse => guests/suse}/guest.rb (100%) rename plugins/{guest_suse => guests/suse}/plugin.rb (100%) rename plugins/{guest_ubuntu => guests/ubuntu}/guest.rb (100%) rename plugins/{guest_ubuntu => guests/ubuntu}/plugin.rb (100%) rename plugins/{host_arch => hosts/arch}/host.rb (100%) rename plugins/{host_arch => hosts/arch}/plugin.rb (100%) rename plugins/{host_bsd => hosts/bsd}/host.rb (100%) rename plugins/{host_bsd => hosts/bsd}/plugin.rb (100%) rename plugins/{host_fedora => hosts/fedora}/host.rb (100%) rename plugins/{host_fedora => hosts/fedora}/plugin.rb (100%) rename plugins/{host_freebsd => hosts/freebsd}/host.rb (100%) rename plugins/{host_freebsd => hosts/freebsd}/plugin.rb (100%) rename plugins/{host_gentoo => hosts/gentoo}/host.rb (100%) rename plugins/{host_gentoo => hosts/gentoo}/plugin.rb (100%) rename plugins/{host_linux => hosts/linux}/host.rb (100%) rename plugins/{host_linux => hosts/linux}/plugin.rb (100%) rename plugins/{host_opensuse => hosts/opensuse}/host.rb (100%) rename plugins/{host_opensuse => hosts/opensuse}/plugin.rb (100%) rename plugins/{host_windows => hosts/windows}/host.rb (100%) rename plugins/{host_windows => hosts/windows}/plugin.rb (100%) rename plugins/{ => provisioners}/chef/plugin.rb (100%) rename plugins/{ => provisioners}/chef/provisioner/base.rb (100%) rename plugins/{ => provisioners}/chef/provisioner/chef_client.rb (100%) rename plugins/{ => provisioners}/chef/provisioner/chef_solo.rb (100%) rename plugins/{ => provisioners}/puppet/plugin.rb (100%) rename plugins/{ => provisioners}/puppet/provisioner/puppet.rb (100%) rename plugins/{ => provisioners}/puppet/provisioner/puppet_server.rb (100%) rename plugins/{ => provisioners}/shell/plugin.rb (100%) rename plugins/{ => provisioners}/shell/provisioner.rb (100%) diff --git a/lib/vagrant.rb b/lib/vagrant.rb index 992e5e685..b65902863 100644 --- a/lib/vagrant.rb +++ b/lib/vagrant.rb @@ -111,15 +111,31 @@ end # # Default I18n to load the en locale I18n.load_path << File.expand_path("templates/locales/en.yml", Vagrant.source_root) -# Load the core plugins that ship with Vagrant -Vagrant.source_root.join("plugins").each_child do |directory| +# A lambda that knows how to load plugins from a single directory. +plugin_load_proc = lambda do |directory| # We only care about directories + return false if !directory.directory? + + # If there is a plugin file in the top-level directory, then load + # that up. + plugin_file = directory.join("plugin.rb") + if plugin_file.file? + load(plugin_file) + return true + end +end + +# Go through the `plugins` directory and attempt to load any plugins. The +# plugins are allowed to be in a directory in `plugins` or at most one +# directory deep within the plugins directory. So a plugin can be at +# `plugins/foo` or also at `plugins/foo/bar`, but no deeper. +Vagrant.source_root.join("plugins").each_child do |directory| + # Ignore non-directories next if !directory.directory? - # We only care if there is a plugin file within the directory - plugin_file = directory.join("plugin.rb") - next if !plugin_file.file? + # Load from this directory, and exit if we successfully loaded a plugin + next if plugin_load_proc.call(directory) - # Load the plugin! - load(plugin_file) + # Otherwise, attempt to load from sub-directories + directory.each_child(&plugin_load_proc) end diff --git a/plugins/command_box/command/add.rb b/plugins/commands/box/command/add.rb similarity index 100% rename from plugins/command_box/command/add.rb rename to plugins/commands/box/command/add.rb diff --git a/plugins/command_box/command/list.rb b/plugins/commands/box/command/list.rb similarity index 100% rename from plugins/command_box/command/list.rb rename to plugins/commands/box/command/list.rb diff --git a/plugins/command_box/command/remove.rb b/plugins/commands/box/command/remove.rb similarity index 100% rename from plugins/command_box/command/remove.rb rename to plugins/commands/box/command/remove.rb diff --git a/plugins/command_box/command/repackage.rb b/plugins/commands/box/command/repackage.rb similarity index 100% rename from plugins/command_box/command/repackage.rb rename to plugins/commands/box/command/repackage.rb diff --git a/plugins/command_box/command/root.rb b/plugins/commands/box/command/root.rb similarity index 100% rename from plugins/command_box/command/root.rb rename to plugins/commands/box/command/root.rb diff --git a/plugins/command_box/plugin.rb b/plugins/commands/box/plugin.rb similarity index 100% rename from plugins/command_box/plugin.rb rename to plugins/commands/box/plugin.rb diff --git a/plugins/command_destroy/command.rb b/plugins/commands/destroy/command.rb similarity index 100% rename from plugins/command_destroy/command.rb rename to plugins/commands/destroy/command.rb diff --git a/plugins/command_destroy/plugin.rb b/plugins/commands/destroy/plugin.rb similarity index 100% rename from plugins/command_destroy/plugin.rb rename to plugins/commands/destroy/plugin.rb diff --git a/plugins/command_gem/command.rb b/plugins/commands/gem/command.rb similarity index 100% rename from plugins/command_gem/command.rb rename to plugins/commands/gem/command.rb diff --git a/plugins/command_gem/plugin.rb b/plugins/commands/gem/plugin.rb similarity index 100% rename from plugins/command_gem/plugin.rb rename to plugins/commands/gem/plugin.rb diff --git a/plugins/command_halt/command.rb b/plugins/commands/halt/command.rb similarity index 100% rename from plugins/command_halt/command.rb rename to plugins/commands/halt/command.rb diff --git a/plugins/command_halt/plugin.rb b/plugins/commands/halt/plugin.rb similarity index 100% rename from plugins/command_halt/plugin.rb rename to plugins/commands/halt/plugin.rb diff --git a/plugins/command_init/command.rb b/plugins/commands/init/command.rb similarity index 100% rename from plugins/command_init/command.rb rename to plugins/commands/init/command.rb diff --git a/plugins/command_init/plugin.rb b/plugins/commands/init/plugin.rb similarity index 100% rename from plugins/command_init/plugin.rb rename to plugins/commands/init/plugin.rb diff --git a/plugins/command_package/command.rb b/plugins/commands/package/command.rb similarity index 100% rename from plugins/command_package/command.rb rename to plugins/commands/package/command.rb diff --git a/plugins/command_package/plugin.rb b/plugins/commands/package/plugin.rb similarity index 100% rename from plugins/command_package/plugin.rb rename to plugins/commands/package/plugin.rb diff --git a/plugins/command_provision/command.rb b/plugins/commands/provision/command.rb similarity index 100% rename from plugins/command_provision/command.rb rename to plugins/commands/provision/command.rb diff --git a/plugins/command_provision/plugin.rb b/plugins/commands/provision/plugin.rb similarity index 100% rename from plugins/command_provision/plugin.rb rename to plugins/commands/provision/plugin.rb diff --git a/plugins/command_reload/command.rb b/plugins/commands/reload/command.rb similarity index 100% rename from plugins/command_reload/command.rb rename to plugins/commands/reload/command.rb diff --git a/plugins/command_reload/plugin.rb b/plugins/commands/reload/plugin.rb similarity index 100% rename from plugins/command_reload/plugin.rb rename to plugins/commands/reload/plugin.rb diff --git a/plugins/command_resume/command.rb b/plugins/commands/resume/command.rb similarity index 100% rename from plugins/command_resume/command.rb rename to plugins/commands/resume/command.rb diff --git a/plugins/command_resume/plugin.rb b/plugins/commands/resume/plugin.rb similarity index 100% rename from plugins/command_resume/plugin.rb rename to plugins/commands/resume/plugin.rb diff --git a/plugins/command_ssh/command.rb b/plugins/commands/ssh/command.rb similarity index 100% rename from plugins/command_ssh/command.rb rename to plugins/commands/ssh/command.rb diff --git a/plugins/command_ssh/plugin.rb b/plugins/commands/ssh/plugin.rb similarity index 100% rename from plugins/command_ssh/plugin.rb rename to plugins/commands/ssh/plugin.rb diff --git a/plugins/command_ssh_config/command.rb b/plugins/commands/ssh_config/command.rb similarity index 100% rename from plugins/command_ssh_config/command.rb rename to plugins/commands/ssh_config/command.rb diff --git a/plugins/command_ssh_config/plugin.rb b/plugins/commands/ssh_config/plugin.rb similarity index 100% rename from plugins/command_ssh_config/plugin.rb rename to plugins/commands/ssh_config/plugin.rb diff --git a/plugins/command_status/command.rb b/plugins/commands/status/command.rb similarity index 100% rename from plugins/command_status/command.rb rename to plugins/commands/status/command.rb diff --git a/plugins/command_status/plugin.rb b/plugins/commands/status/plugin.rb similarity index 100% rename from plugins/command_status/plugin.rb rename to plugins/commands/status/plugin.rb diff --git a/plugins/command_suspend/command.rb b/plugins/commands/suspend/command.rb similarity index 100% rename from plugins/command_suspend/command.rb rename to plugins/commands/suspend/command.rb diff --git a/plugins/command_suspend/plugin.rb b/plugins/commands/suspend/plugin.rb similarity index 100% rename from plugins/command_suspend/plugin.rb rename to plugins/commands/suspend/plugin.rb diff --git a/plugins/command_up/command.rb b/plugins/commands/up/command.rb similarity index 100% rename from plugins/command_up/command.rb rename to plugins/commands/up/command.rb diff --git a/plugins/command_up/plugin.rb b/plugins/commands/up/plugin.rb similarity index 100% rename from plugins/command_up/plugin.rb rename to plugins/commands/up/plugin.rb diff --git a/plugins/command_up/start_mixins.rb b/plugins/commands/up/start_mixins.rb similarity index 100% rename from plugins/command_up/start_mixins.rb rename to plugins/commands/up/start_mixins.rb diff --git a/plugins/guest_arch/guest.rb b/plugins/guests/arch/guest.rb similarity index 100% rename from plugins/guest_arch/guest.rb rename to plugins/guests/arch/guest.rb diff --git a/plugins/guest_arch/plugin.rb b/plugins/guests/arch/plugin.rb similarity index 100% rename from plugins/guest_arch/plugin.rb rename to plugins/guests/arch/plugin.rb diff --git a/plugins/guest_debian/guest.rb b/plugins/guests/debian/guest.rb similarity index 100% rename from plugins/guest_debian/guest.rb rename to plugins/guests/debian/guest.rb diff --git a/plugins/guest_debian/plugin.rb b/plugins/guests/debian/plugin.rb similarity index 100% rename from plugins/guest_debian/plugin.rb rename to plugins/guests/debian/plugin.rb diff --git a/plugins/guest_fedora/guest.rb b/plugins/guests/fedora/guest.rb similarity index 100% rename from plugins/guest_fedora/guest.rb rename to plugins/guests/fedora/guest.rb diff --git a/plugins/guest_fedora/plugin.rb b/plugins/guests/fedora/plugin.rb similarity index 100% rename from plugins/guest_fedora/plugin.rb rename to plugins/guests/fedora/plugin.rb diff --git a/plugins/guest_freebsd/config.rb b/plugins/guests/freebsd/config.rb similarity index 100% rename from plugins/guest_freebsd/config.rb rename to plugins/guests/freebsd/config.rb diff --git a/plugins/guest_freebsd/guest.rb b/plugins/guests/freebsd/guest.rb similarity index 100% rename from plugins/guest_freebsd/guest.rb rename to plugins/guests/freebsd/guest.rb diff --git a/plugins/guest_freebsd/plugin.rb b/plugins/guests/freebsd/plugin.rb similarity index 100% rename from plugins/guest_freebsd/plugin.rb rename to plugins/guests/freebsd/plugin.rb diff --git a/plugins/guest_gentoo/guest.rb b/plugins/guests/gentoo/guest.rb similarity index 100% rename from plugins/guest_gentoo/guest.rb rename to plugins/guests/gentoo/guest.rb diff --git a/plugins/guest_gentoo/plugin.rb b/plugins/guests/gentoo/plugin.rb similarity index 100% rename from plugins/guest_gentoo/plugin.rb rename to plugins/guests/gentoo/plugin.rb diff --git a/plugins/guest_linux/config.rb b/plugins/guests/linux/config.rb similarity index 100% rename from plugins/guest_linux/config.rb rename to plugins/guests/linux/config.rb diff --git a/plugins/guest_linux/guest.rb b/plugins/guests/linux/guest.rb similarity index 100% rename from plugins/guest_linux/guest.rb rename to plugins/guests/linux/guest.rb diff --git a/plugins/guest_linux/plugin.rb b/plugins/guests/linux/plugin.rb similarity index 100% rename from plugins/guest_linux/plugin.rb rename to plugins/guests/linux/plugin.rb diff --git a/plugins/guest_openbsd/guest.rb b/plugins/guests/openbsd/guest.rb similarity index 100% rename from plugins/guest_openbsd/guest.rb rename to plugins/guests/openbsd/guest.rb diff --git a/plugins/guest_openbsd/plugin.rb b/plugins/guests/openbsd/plugin.rb similarity index 100% rename from plugins/guest_openbsd/plugin.rb rename to plugins/guests/openbsd/plugin.rb diff --git a/plugins/guest_redhat/guest.rb b/plugins/guests/redhat/guest.rb similarity index 100% rename from plugins/guest_redhat/guest.rb rename to plugins/guests/redhat/guest.rb diff --git a/plugins/guest_redhat/plugin.rb b/plugins/guests/redhat/plugin.rb similarity index 100% rename from plugins/guest_redhat/plugin.rb rename to plugins/guests/redhat/plugin.rb diff --git a/plugins/guest_solaris/config.rb b/plugins/guests/solaris/config.rb similarity index 100% rename from plugins/guest_solaris/config.rb rename to plugins/guests/solaris/config.rb diff --git a/plugins/guest_solaris/guest.rb b/plugins/guests/solaris/guest.rb similarity index 100% rename from plugins/guest_solaris/guest.rb rename to plugins/guests/solaris/guest.rb diff --git a/plugins/guest_solaris/plugin.rb b/plugins/guests/solaris/plugin.rb similarity index 100% rename from plugins/guest_solaris/plugin.rb rename to plugins/guests/solaris/plugin.rb diff --git a/plugins/guest_suse/guest.rb b/plugins/guests/suse/guest.rb similarity index 100% rename from plugins/guest_suse/guest.rb rename to plugins/guests/suse/guest.rb diff --git a/plugins/guest_suse/plugin.rb b/plugins/guests/suse/plugin.rb similarity index 100% rename from plugins/guest_suse/plugin.rb rename to plugins/guests/suse/plugin.rb diff --git a/plugins/guest_ubuntu/guest.rb b/plugins/guests/ubuntu/guest.rb similarity index 100% rename from plugins/guest_ubuntu/guest.rb rename to plugins/guests/ubuntu/guest.rb diff --git a/plugins/guest_ubuntu/plugin.rb b/plugins/guests/ubuntu/plugin.rb similarity index 100% rename from plugins/guest_ubuntu/plugin.rb rename to plugins/guests/ubuntu/plugin.rb diff --git a/plugins/host_arch/host.rb b/plugins/hosts/arch/host.rb similarity index 100% rename from plugins/host_arch/host.rb rename to plugins/hosts/arch/host.rb diff --git a/plugins/host_arch/plugin.rb b/plugins/hosts/arch/plugin.rb similarity index 100% rename from plugins/host_arch/plugin.rb rename to plugins/hosts/arch/plugin.rb diff --git a/plugins/host_bsd/host.rb b/plugins/hosts/bsd/host.rb similarity index 100% rename from plugins/host_bsd/host.rb rename to plugins/hosts/bsd/host.rb diff --git a/plugins/host_bsd/plugin.rb b/plugins/hosts/bsd/plugin.rb similarity index 100% rename from plugins/host_bsd/plugin.rb rename to plugins/hosts/bsd/plugin.rb diff --git a/plugins/host_fedora/host.rb b/plugins/hosts/fedora/host.rb similarity index 100% rename from plugins/host_fedora/host.rb rename to plugins/hosts/fedora/host.rb diff --git a/plugins/host_fedora/plugin.rb b/plugins/hosts/fedora/plugin.rb similarity index 100% rename from plugins/host_fedora/plugin.rb rename to plugins/hosts/fedora/plugin.rb diff --git a/plugins/host_freebsd/host.rb b/plugins/hosts/freebsd/host.rb similarity index 100% rename from plugins/host_freebsd/host.rb rename to plugins/hosts/freebsd/host.rb diff --git a/plugins/host_freebsd/plugin.rb b/plugins/hosts/freebsd/plugin.rb similarity index 100% rename from plugins/host_freebsd/plugin.rb rename to plugins/hosts/freebsd/plugin.rb diff --git a/plugins/host_gentoo/host.rb b/plugins/hosts/gentoo/host.rb similarity index 100% rename from plugins/host_gentoo/host.rb rename to plugins/hosts/gentoo/host.rb diff --git a/plugins/host_gentoo/plugin.rb b/plugins/hosts/gentoo/plugin.rb similarity index 100% rename from plugins/host_gentoo/plugin.rb rename to plugins/hosts/gentoo/plugin.rb diff --git a/plugins/host_linux/host.rb b/plugins/hosts/linux/host.rb similarity index 100% rename from plugins/host_linux/host.rb rename to plugins/hosts/linux/host.rb diff --git a/plugins/host_linux/plugin.rb b/plugins/hosts/linux/plugin.rb similarity index 100% rename from plugins/host_linux/plugin.rb rename to plugins/hosts/linux/plugin.rb diff --git a/plugins/host_opensuse/host.rb b/plugins/hosts/opensuse/host.rb similarity index 100% rename from plugins/host_opensuse/host.rb rename to plugins/hosts/opensuse/host.rb diff --git a/plugins/host_opensuse/plugin.rb b/plugins/hosts/opensuse/plugin.rb similarity index 100% rename from plugins/host_opensuse/plugin.rb rename to plugins/hosts/opensuse/plugin.rb diff --git a/plugins/host_windows/host.rb b/plugins/hosts/windows/host.rb similarity index 100% rename from plugins/host_windows/host.rb rename to plugins/hosts/windows/host.rb diff --git a/plugins/host_windows/plugin.rb b/plugins/hosts/windows/plugin.rb similarity index 100% rename from plugins/host_windows/plugin.rb rename to plugins/hosts/windows/plugin.rb diff --git a/plugins/chef/plugin.rb b/plugins/provisioners/chef/plugin.rb similarity index 100% rename from plugins/chef/plugin.rb rename to plugins/provisioners/chef/plugin.rb diff --git a/plugins/chef/provisioner/base.rb b/plugins/provisioners/chef/provisioner/base.rb similarity index 100% rename from plugins/chef/provisioner/base.rb rename to plugins/provisioners/chef/provisioner/base.rb diff --git a/plugins/chef/provisioner/chef_client.rb b/plugins/provisioners/chef/provisioner/chef_client.rb similarity index 100% rename from plugins/chef/provisioner/chef_client.rb rename to plugins/provisioners/chef/provisioner/chef_client.rb diff --git a/plugins/chef/provisioner/chef_solo.rb b/plugins/provisioners/chef/provisioner/chef_solo.rb similarity index 100% rename from plugins/chef/provisioner/chef_solo.rb rename to plugins/provisioners/chef/provisioner/chef_solo.rb diff --git a/plugins/puppet/plugin.rb b/plugins/provisioners/puppet/plugin.rb similarity index 100% rename from plugins/puppet/plugin.rb rename to plugins/provisioners/puppet/plugin.rb diff --git a/plugins/puppet/provisioner/puppet.rb b/plugins/provisioners/puppet/provisioner/puppet.rb similarity index 100% rename from plugins/puppet/provisioner/puppet.rb rename to plugins/provisioners/puppet/provisioner/puppet.rb diff --git a/plugins/puppet/provisioner/puppet_server.rb b/plugins/provisioners/puppet/provisioner/puppet_server.rb similarity index 100% rename from plugins/puppet/provisioner/puppet_server.rb rename to plugins/provisioners/puppet/provisioner/puppet_server.rb diff --git a/plugins/shell/plugin.rb b/plugins/provisioners/shell/plugin.rb similarity index 100% rename from plugins/shell/plugin.rb rename to plugins/provisioners/shell/plugin.rb diff --git a/plugins/shell/provisioner.rb b/plugins/provisioners/shell/provisioner.rb similarity index 100% rename from plugins/shell/provisioner.rb rename to plugins/provisioners/shell/provisioner.rb