From c27d857387e77f6317ade2dc87b53b63b9bd5f6d Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 3 Jul 2011 17:19:28 -0700 Subject: [PATCH] Rename :chef_server to :chef_client. [GH-359] --- CHANGELOG.md | 1 + lib/vagrant/provisioners.rb | 2 +- .../provisioners/{chef_server.rb => chef_client.rb} | 8 ++++---- templates/locales/en.yml | 2 +- .../{chef_server_test.rb => chef_client_test.rb} | 4 ++-- 5 files changed, 9 insertions(+), 8 deletions(-) rename lib/vagrant/provisioners/{chef_server.rb => chef_client.rb} (98%) rename test/vagrant/provisioners/{chef_server_test.rb => chef_client_test.rb} (98%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 38953282e..13abc4853 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## 0.8.0 (unreleased) - Performance optimizations in `virtualbox` gem. Huge speed gains. + - `:chef_server` provisioner is now `:chef_client`. [GH-359] ## 0.7.6 (July 2, 2011) diff --git a/lib/vagrant/provisioners.rb b/lib/vagrant/provisioners.rb index 5e963e4ce..6393a889e 100644 --- a/lib/vagrant/provisioners.rb +++ b/lib/vagrant/provisioners.rb @@ -2,7 +2,7 @@ # as configuration classes right away with Vagrant. require 'vagrant/provisioners/base' require 'vagrant/provisioners/chef' -require 'vagrant/provisioners/chef_server' +require 'vagrant/provisioners/chef_client' require 'vagrant/provisioners/chef_solo' require 'vagrant/provisioners/puppet' require 'vagrant/provisioners/puppet_server' diff --git a/lib/vagrant/provisioners/chef_server.rb b/lib/vagrant/provisioners/chef_client.rb similarity index 98% rename from lib/vagrant/provisioners/chef_server.rb rename to lib/vagrant/provisioners/chef_client.rb index 969572db2..deb2cccf2 100644 --- a/lib/vagrant/provisioners/chef_server.rb +++ b/lib/vagrant/provisioners/chef_client.rb @@ -4,8 +4,8 @@ module Vagrant module Provisioners # This class implements provisioning via chef-client, allowing provisioning # with a chef server. - class ChefServer < Chef - register :chef_server + class ChefClient < Chef + register :chef_client class Config < Chef::Config attr_accessor :chef_server_url @@ -68,7 +68,7 @@ module Vagrant env.ui.info I18n.t("vagrant.provisioners.chef.upload_validation_key") vm.ssh.upload!(validation_key_path, guest_validation_key_path) end - + def upload_encrypted_data_bag_secret env.ui.info I18n.t("vagrant.provisioners.chef.upload_encrypted_data_bag_secret_key") vm.ssh.upload!(encrypted_data_bag_secret_key_path, config.encrypted_data_bag_secret) @@ -107,7 +107,7 @@ module Vagrant def validation_key_path File.expand_path(config.validation_key_path, env.root_path) end - + def encrypted_data_bag_secret_key_path File.expand_path(config.encrypted_data_bag_secret_key_path, env.root_path) end diff --git a/templates/locales/en.yml b/templates/locales/en.yml index 08966db1e..203a3da9e 100644 --- a/templates/locales/en.yml +++ b/templates/locales/en.yml @@ -468,7 +468,7 @@ en: upload_encrypted_data_bag_secret_key: "Uploading chef encrypted data bag secret key..." running_client: "Running chef-client..." running_solo: "Running chef-solo..." - invalid_provisioner: "Vagrant::Provisioners::Chef is not a valid provisioner! Use ChefSolo or ChefServer instead." + invalid_provisioner: "Vagrant::Provisioners::Chef is not a valid provisioner! Use ChefSolo or ChefClient instead." not_detected: |- The `%{binary}` binary appears to not be in the PATH of the guest. This could be because the PATH is not properly setup or perhaps chef is not diff --git a/test/vagrant/provisioners/chef_server_test.rb b/test/vagrant/provisioners/chef_client_test.rb similarity index 98% rename from test/vagrant/provisioners/chef_server_test.rb rename to test/vagrant/provisioners/chef_client_test.rb index 04c69a66f..ac6721b93 100644 --- a/test/vagrant/provisioners/chef_server_test.rb +++ b/test/vagrant/provisioners/chef_client_test.rb @@ -1,8 +1,8 @@ require "test_helper" -class ChefServerProvisionerTest < Test::Unit::TestCase +class ChefClientProvisionerTest < Test::Unit::TestCase setup do - @klass = Vagrant::Provisioners::ChefServer + @klass = Vagrant::Provisioners::ChefClient @action_env = Vagrant::Action::Environment.new(vagrant_env.vms[:default].env)