Ok I will file an issue on the Windows cookbook. To use the core windows_* resources, I just remove the dependency on the windows cookbook in my metadata.rb file? Chris From: Jay Mundrawala [mailto:
You're using the Windows cookbook, which has slight differences from the core windows package resource. You could file an issue for the Windows cookbook so we don't lose track of this. On Feb 22, 2015 6:18 PM, "Fouts, Chris" <
">
> wrote: That’s what ended up doing. However, according to
https://docs.chef.io/resource_windows_package.html, the source attribute is optional, and takes on the resource’s name. This used to work! Chris From: Jay Mundrawala [mailto:
" target="_blank">
]
Specify the path to the MSI in the source attribute instead of as the name of the resource. As example from the cookbook: windows_package 'Mozilla Firefox 5.0 (x86 en-US)' do options '-ms' installer_type :custom action :install end On Feb 22, 2015 6:06 PM, "Fouts, Chris" <
" target="_blank">
> wrote: Here’s a better cut/paste of the output. My original post looked like the *.msi name was misconfigured. Chris ============================================================================ ==== Error executing action `install` on resource 'windows_package[c:\windows\tem p\chef-client\DbBuilder-0.0.0051-339.msi]' ============================================================================ ==== Chef::Exceptions::ValidationFailed ---------------------------------- Required argument source is missing! Cookbook Trace: --------------- c:/chef/cache/cookbooks/windows/libraries/windows_package.rb:106:in `install _package' c:/chef/cache/cookbooks/windows/libraries/windows_package.rb:31:in `block in <class:WindowsCookbookPackage>' Resource Declaration: --------------------- # In c:/chef/cache/cookbooks/db-mssql/recipes/install_dbbuilder.rb 26: windows_package "#{win_pkg}" do 27: action :install 28: installer_type :msi 29: options "quiet" 30: end 31: Compiled Resource: ------------------ # Declared in c:/chef/cache/cookbooks/db-mssql/recipes/install_dbbuilder.rb: 26:in `from_file' windows_cookbook_package("c:\windows\temp\chef-client\DbBuilder-0.0.0051-339 .msi") do provider Chef::Provider::WindowsCookbookPackage action [:install] retries 0 retry_delay 2 default_guard_interpreter :default declared_type :windows_package cookbook_name "db-mssql" recipe_name "install_dbbuilder" installer_type :msi options "quiet" package_name "c:\\windows\\temp\\chef-client\\DbBuilder-0.0.0051-339.msi" end [2015-02-22T20:22:24-05:00] INFO: Running queued delayed notifications before re -raising exception Running handlers: [2015-02-22T20:22:24-05:00] ERROR: Running exception handlers Running handlers complete [2015-02-22T20:22:24-05:00] ERROR: Exception handlers complete [2015-02-22T20:22:24-05:00] FATAL: Stacktrace dumped to c:/chef/cache/chef-stack trace.out Chef Client failed. 14 resources updated in 37.360134 seconds [2015-02-22T20:22:24-05:00] INFO: Sending resource update report (run-id: 10c432 fa-7efa-49de-8248-e91238e1a0a8) [2015-02-22T20:22:24-05:00] FATAL: Chef::Exceptions::ValidationFailed: windows_p ackage[c:\windows\temp\chef-client\DbBuilder-0.0.0051-339.msi] (db-mssql::instal l_dbbuilder line 26) had an error: Chef::Exceptions::ValidationFailed: Required argument source is missing! From: Fouts, Chris [mailto:
" target="_blank">
]
If I install the *.msi manually, it installs. When installing it via windows_package resource, I get an exception. I can’t find what Chef means by “Required
argument source is missing!” ========================================================================== ==== Error executing action `install` on resource 'windows_package[c:\windows\t p\chef-client\DbBuilder-0.0.0051-339.msi]' ========================================================================== ==== Chef::Exceptions::ValidationFailed ---------------------------------- Required argument source is missing! Cookbook Trace: --------------- c:/chef/cache/cookbooks/windows/libraries/windows_package.rb:106:in `insta _package' c:/chef/cache/cookbooks/windows/libraries/windows_package.rb:31:in `block <class:WindowsCookbookPackage>' Resource Declaration: --------------------- # In c:/chef/cache/cookbooks/db-mssql/recipes/install_dbbuilder.rb 26: windows_package "#{win_pkg}" do 27: action :install 28: installer_type :msi 29: options "quiet" 30: end 31: Compiled Resource: ------------------ # Declared in c:/chef/cache/cookbooks/db-mssql/recipes/install_dbbuilder.r 26:in `from_file' windows_cookbook_package("c:\windows\temp\chef-client\DbBuilder-0.0.0051-3 .msi") do provider Chef::Provider::WindowsCookbookPackage action [:install] retries 0 retry_delay 2 default_guard_interpreter :default declared_type :windows_package cookbook_name "db-mssql" recipe_name "install_dbbuilder" installer_type :msi options "quiet" package_name "c:\\windows\\temp\\chef-client\\DbBuilder-0.0.0051-339.msi end [2015-02-22T20:22:24-05:00] INFO: Running queued delayed notifications before -raising exception [2015-02-22T20:22:24-05:00] INFO: Running queued delayed notifications before re -raising exception Running handlers: [2015-02-22T20:22:24-05:00] ERROR: Running exception handlers Running handlers complete [2015-02-22T20:22:24-05:00] ERROR: Exception handlers complete [2015-02-22T20:22:24-05:00] FATAL: Stacktrace dumped to c:/chef/cache/chef-stack trace.out Chef Client failed. 14 resources updated in 37.360134 seconds [2015-02-22T20:22:24-05:00] INFO: Sending resource update report (run-id: 10c432 fa-7efa-49de-8248-e91238e1a0a8) [2015-02-22T20:22:24-05:00] FATAL: Chef::Exceptions::ValidationFailed: windows_p ackage[c:\windows\temp\chef-client\DbBuilder-0.0.0051-339.msi] (db-mssql::instal l_dbbuilder line 26) had an error: Chef::Exceptions::ValidationFailed: Required argument source is missing! |
Archive powered by MHonArc 2.6.16.