I would like to have cookbooks installing packages on my node using a private repo located on the workstation for exemple, I don’t want to have my nodes searching for the packages on the internet but from a private chocolatey repo for exemple. Do you know how i could do this ?
Thanks for your help , i finally used nexus to mirror my repo but i have two problems :
i need to authenticate with admin/admin123 in order to reach the repo. So how can we pass credentials in the chocolatey_package ressource?
my source is : localhost:8081/repository/ which is located on my workstation so i need to change this url to access server.
Do you know how can we do that from nexus?
Yes you want to use the options property to pass along the user and password switches. The chocolatey_package handles the options property a bit differently than the chocolatey cookbook’s chocolatey LWRP. Instead of a hash you want to pass a string. So it would look like:
chocolatey_package "some_private_secure_package" do
source "https://some.proget/feed"
options '-u=username -p=password'
end
chocolatey_package[soapui] action install[2016-07-19T15:49:00+02:00] INFO: P
rocessing chocolatey_package[soapui] action install (soapui::default line 10)
No version specified, and no candidate version available for soapuie[0m
============================================================================
====
Error executing action install on resource ‘chocolatey_package[soapui]’
============================================================================
====
Chef::Exceptions::Package
No version specified, and no candidate version available for soapui
Resource Declaration:
In c:/chef/cache/cookbooks/soapui/recipes/default.rb
/"
options "-u=admin -p=admin123"
version [“v5.2.1”]
end
Platform:
---------
i386-mingw32
[2016-07-19T15:49:02+02:00] INFO: Running queued delayed notifications before re
-raising exception
e[0m
Running handlers:
[2016-07-19T15:49:02+02:00] ERROR: Running exception handlers
Running handlers complete
[2016-07-19T15:49:02+02:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 18 seconds
[2016-07-19T15:49:02+02:00] INFO: Sending resource update report (run-id: 985740
81-fc47-4f92-a17e-79a86590049e)
[2016-07-19T15:49:02+02:00] FATAL: Stacktrace dumped to c:/chef/cache/chef-stack
trace.out
[2016-07-19T15:49:02+02:00] FATAL: Please provide the contents of the stacktrace
.out file if you file a bug report
[2016-07-19T15:49:02+02:00] FATAL: Chef::Exceptions: chocolatey_package
[soapui] (soapui::default line 10) had an error: Chef::Exceptions: No v
ersion specified, and no candidate version available for soapui
Do you get the error? chocolatey seemes to recognize soapui though…