- From: JJ Asghar <
>
- To:
- Subject: [chef] Re: Vim problem with chef-zero and vagrant
- Date: Wed, 28 Jan 2015 14:56:41 -0600
Tony,
https://docs.vagrantup.com/v2/provisioning/chef_zero.html
If you look at the chef_zero documentation, it looks like it's
"chef_zero" not :chef_zero.
Can you humor me and see if that fixes it?
Also, in this case, I'd look at chef-apply over chef_zero, it seems
closer to what you're attempting to do.
https://docs.vagrantup.com/v2/provisioning/chef_apply.html
HTH,
JJ
Best Regards,
JJ Asghar
c: 512.619.0722 t: @jjasghar irc: j^2
On Wed, Jan 28, 2015 at 3:22 AM, Anthony Kong
<
>
wrote:
>
Hi,
>
>
When I tried to install the vim recipe, I got this error message:
>
>
==> default: [2015-01-28T08:30:19+00:00] DEBUG: Found recipe package in
>
cookbook vim
>
==> default: [2015-01-28T08:30:19+00:00] DEBUG: Caught
>
InvalidVersionConstraint. This means that a key in value_for_platform cannot
>
be interpreted as a Chef::VersionConstraint.
>
==> default: [2015-01-28T08:30:19+00:00] DEBUG: 'default'
>
(Chef::Exceptions::InvalidVersionConstraint)
>
==> default:
>
/opt/chef/embedded/apps/chef/lib/chef/version_constraint.rb:113:in `parse'
>
==> default:
>
/opt/chef/embedded/apps/chef/lib/chef/version_constraint.rb:36:in
>
`initialize'
>
==> default:
>
/opt/chef/embedded/apps/chef/lib/chef/dsl/platform_introspection.rb:79:in
>
`new'
>
==> default:
>
/opt/chef/embedded/apps/chef/lib/chef/dsl/platform_introspection.rb:79:in
>
`block in match_versions'
>
==> default:
>
/opt/chef/embedded/apps/chef/lib/chef/dsl/platform_introspection.rb:77:in
>
`each'
>
==> default:
>
/opt/chef/embedded/apps/chef/lib/chef/dsl/platform_introspection.rb:77:in
>
`match_versions'
>
==> default:
>
/opt/chef/embedded/apps/chef/lib/chef/dsl/platform_introspection.rb:54:in
>
`value_for_node'
>
==> default:
>
/opt/chef/embedded/apps/chef/lib/chef/dsl/platform_introspection.rb:149:in
>
`value_for_platform'
>
==> default:
>
/tmp/vagrant-chef/fde7703d3d9a9afc6709c47aeb2e0724/cookbooks/vim/recipes/package.rb:23:in
>
`from_file'
>
==> default: /opt/chef/embedded/apps/chef/lib/chef/mixin/from_file.rb:30:in
>
`instance_eval'
>
==> default: /opt/chef/embedded/apps/chef/lib/chef/mixin/from_file.rb:30:in
>
`from_file'
>
==> default:
>
/opt/chef/embedded/apps/chef/lib/chef/cookbook_version.rb:245:in
>
`load_recipe'
>
==> default: /opt/chef/embedded/apps/chef/lib/chef/run_context.rb:169:in
>
`load_recipe'
>
==> default: /opt/chef/embedded/apps/chef/lib/chef/run_context.rb:138:in
>
`block in include_recipe'
>
==> default: /opt/chef/embedded/apps/chef/lib/chef/run_context.rb:137:in
>
`each'
>
==> default: /opt/chef/embedded/apps/chef/lib/chef/run_context.rb:137:in
>
`include_recipe'
>
==> default:
>
/opt/chef/embedded/apps/chef/lib/chef/dsl/include_recipe.rb:26:in
>
`include_recipe'
>
==> default:
>
/tmp/vagrant-chef/fde7703d3d9a9afc6709c47aeb2e0724/cookbooks/vim/recipes/default.rb:21:in
>
`from_file'
>
==> default: /opt/chef/embedded/apps/chef/lib/chef/mixin/from_file.rb:30:in
>
`instance_eval'
>
==> default: /opt/chef/embedded/apps/chef/lib/chef/mixin/from_file.rb:30:in
>
`from_file'
>
==> default:
>
/opt/chef/embedded/apps/chef/lib/chef/cookbook_version.rb:245:in
>
`load_recipe'
>
==> default: /opt/chef/embedded/apps/chef/lib/chef/run_context.rb:169:in
>
`load_recipe'
>
==> default:
>
/opt/chef/embedded/apps/chef/lib/chef/run_context/cookbook_compiler.rb:140:in
>
`block in compile_recipes'
>
==> default:
>
/opt/chef/embedded/apps/chef/lib/chef/run_context/cookbook_compiler.rb:138:in
>
`each'
>
==> default:
>
/opt/chef/embedded/apps/chef/lib/chef/run_context/cookbook_compiler.rb:138:in
>
`compile_recipes'
>
==> default:
>
/opt/chef/embedded/apps/chef/lib/chef/run_context/cookbook_compiler.rb:75:in
>
`compile'
>
==> default: /opt/chef/embedded/apps/chef/lib/chef/run_context.rb:92:in
>
`load'
>
==> default:
>
/opt/chef/embedded/apps/chef/lib/chef/policy_builder/expand_node_object.rb:73:in
>
`setup_run_context'
>
==> default: /opt/chef/embedded/apps/chef/lib/chef/client.rb:235:in
>
`setup_run_context'
>
==> default: /opt/chef/embedded/apps/chef/lib/chef/client.rb:397:in `run'
>
==> default: /opt/chef/embedded/apps/chef/lib/chef/application.rb:261:in
>
`block in fork_chef_client'
>
==> default: /opt/chef/embedded/apps/chef/lib/chef/application.rb:249:in
>
`fork'
>
==> default: /opt/chef/embedded/apps/chef/lib/chef/application.rb:249:in
>
`fork_chef_client'
>
==> default: /opt/chef/embedded/apps/chef/lib/chef/application.rb:215:in
>
`block in run_chef_client'
>
==> default: /opt/chef/embedded/apps/chef/lib/chef/local_mode.rb:38:in
>
`with_server_connectivity'
>
==> default: /opt/chef/embedded/apps/chef/lib/chef/application.rb:201:in
>
`run_chef_client'
>
==> default:
>
/opt/chef/embedded/apps/chef/lib/chef/application/solo.rb:245:in `block in
>
interval_run_chef_client'
>
==> default:
>
/opt/chef/embedded/apps/chef/lib/chef/application/solo.rb:234:in `loop'
>
==> default:
>
/opt/chef/embedded/apps/chef/lib/chef/application/solo.rb:234:in
>
`interval_run_chef_client'
>
==> default:
>
/opt/chef/embedded/apps/chef/lib/chef/application/solo.rb:224:in
>
`run_application'
>
==> default: /opt/chef/embedded/apps/chef/lib/chef/application.rb:58:in
>
`run'
>
==> default: /opt/chef/embedded/apps/chef/bin/chef-solo:25:in `<top
>
(required)>'
>
==> default: /usr/bin/chef-solo:40:in `load'
>
==> default: /usr/bin/chef-solo:40:in `<main>'
>
>
>
Here is the provision section of my Vagrant file:
>
>
config.vm.provision :chef_zero do |chef|
>
# Do not need to specify cookbook path
>
# because of the berkshelf plugin
>
# Enable this for debug info
>
chef.log_level = :debug
>
chef.data_bags_path = "data_bags"
>
chef.add_recipe 'apt'
>
chef.add_recipe 'python'
>
chef.add_recipe 'vim'
>
chef.add_recipe 'git'
>
end
>
>
Do you know why it failed and how can I fix it?
>
>
Cheers, Tony
>
>
>
Archive powered by MHonArc 2.6.16.