Vagrant 厨师寻找窗户,尽管不需要

Vagrant 厨师寻找窗户,尽管不需要,vagrant,chef-infra,provisioning,Vagrant,Chef Infra,Provisioning,我是厨师的新手,我用它来供应食物。到目前为止,我已经为vim和git等基本配方进行了配置,但这导致了一长串基于依赖关系的错误。我一直乐于助人,但现在它要的是一本Windows的食谱。我想保持这个轻量级,但我想知道如果它开始问这个问题,我是否采取了错误的方法(我不希望这个盒子是Windows就绪的!) 我做错了什么,如果有的话 错误: ==> default: [2014-09-17T17:29:30+00:00] INFO: Setting the run_list to ["recipe

我是厨师的新手,我用它来供应食物。到目前为止,我已经为vim和git等基本配方进行了配置,但这导致了一长串基于依赖关系的错误。我一直乐于助人,但现在它要的是一本Windows的食谱。我想保持这个轻量级,但我想知道如果它开始问这个问题,我是否采取了错误的方法(我不希望这个盒子是Windows就绪的!)

我做错了什么,如果有的话

错误:

==> default: [2014-09-17T17:29:30+00:00] INFO: Setting the run_list to ["recipe[vim]", "recipe[git]", "recipe[users::ruby_shadow]", "recipe[users::sysadmins]", "recipe[users::sysadmin_sudo]", "recipe[root_ssh_agent::ppid]", "recipe[ssh_known_hosts]", "recipe[homesick_agent::data_bag]"] from JSON
==> default: [2014-09-17T17:29:30+00:00] INFO: Run List is [recipe[vim], recipe[git], recipe[users::ruby_shadow], recipe[users::sysadmins], recipe[users::sysadmin_sudo], recipe[root_ssh_agent::ppid], recipe[ssh_known_hosts], recipe[homesick_agent::data_bag]]
==> default: [2014-09-17T17:29:30+00:00] INFO: Run List expands to [vim, git, users::ruby_shadow, users::sysadmins, users::sysadmin_sudo, root_ssh_agent::ppid, ssh_known_hosts, homesick_agent::data_bag]
==> default: [2014-09-17T17:29:30+00:00] INFO: Starting Chef Run for vagrant-ubuntu-trusty-32
==> default: [2014-09-17T17:29:30+00:00] INFO: Running start handlers
==> default: [2014-09-17T17:29:30+00:00] INFO: Start handlers complete.
==> default: [2014-09-17T17:29:31+00:00] ERROR: Running exception handlers
==> default: [2014-09-17T17:29:31+00:00] ERROR: Exception handlers complete
==> default: [2014-09-17T17:29:31+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2014-09-17T17:29:31+00:00] ERROR: Cookbook windows not found. If you're loading windows from another cookbook, make sure you configure the dependency in your metadata
==> default: [2014-09-17T17:29:28+00:00] INFO: Forking chef instance to converge...
==> default: [2014-09-17T17:29:31+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

您仍然需要windows cookbook,因为它是您正在使用的东西的依赖项。它实际上不会使用烹饪书中的任何食谱,但它确实需要加载。我建议使用Berkshelf,因为它会在幕后为您解决这个问题。

我不能手动抑制依赖项以使其更轻量级吗?也许没必要。顺便说一句,我认为有一个比Berkshelf更好(更现代)的解决方案:不,你不能。Chef不支持任何形式的可选依赖项或条件依赖项。您将不得不分叉依赖于它的上游食谱,并移除依赖关系。那篇博文也过时了,这一点在它的顶部已经很清楚了。@KindOfGuy不必担心包含其他平台烹饪书。理想情况下,厨师烹饪书是跨平台编写的。仅仅因为“windows”被导入并不意味着它将被使用。别忘了这是配置而不是代码。最后,Berkshelf是chef开发的基本工具。