chef_client provisioning is not workig

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

chef_client provisioning is not workig

rahul joshi
Can someone please help me? I am trying to use the chef client provisioner. I get the following errors.

`block (2 levels) in <top (required)>': wrong number of arguments (1 for 0) (ArgumentError)
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/kernel_v2/config/vm_provisioner.rb:42:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/kernel_v2/config/vm_provisioner.rb:42:in `initialize'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/kernel_v2/config/vm.rb:191:in `new'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/kernel_v2/config/vm.rb:191:in `provision'
from /home/rahul/ChefDev/cumin-chef-repo/VagrantProjects/tig-nexus-server/Vagrantfile:17:in `block in <top (required)>'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/config/v2/loader.rb:37:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/config/v2/loader.rb:37:in `load'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/config/loader.rb:104:in `block (2 levels) in load'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/config/loader.rb:98:in `each'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/config/loader.rb:98:in `block in load'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/config/loader.rb:95:in `each'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/config/loader.rb:95:in `load'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/environment.rb:261:in `config_global'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/environment.rb:502:in `block in action_runner'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:28:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:28:in `run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/environment.rb:274:in `hook'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/environment.rb:135:in `initialize'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/bin/vagrant:62:in `new'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.2/bin/vagrant:62:in `<top (required)>'
from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'

===============

My vagrantfile is as follows:
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  # All Vagrant configuration is done here. The most common configuration
  # options are documented and commented below. For a complete reference,
  # please see the online documentation at vagrantup.com.

#config.vm.provision :shell, :inline => "Setting up two machines"
config.vm.box =     "tig-nexus-server"
config.vm.hostname =   "tig-nexus-server"

config.vm.network :forwarded_port, guest: 8081, host: 8081
config.vm.network :forwarded_port, guest: 8443, host: 8443

  #chef_client provision
config.vm.provision :chef_client do |chef|
chef.chef_server_url          "xxxxxx"
chef.validation_key_path      "xxxxxx.pem"
chef.client_key_path          "xxxxxx.pem"
chef.validation_client_name   "xxxxxx"
chef.encrypted_data_bag_secret_path "xxxxxx" 
chef.run_list = ["recipe[apt]", "recipe[java::openjdk]", "recipe[nexus]"]
end

  end
==================================================================

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.