I just don't understand the relation between the cookbook and the resource.. Are they both needed if I wanted to install and use Chocolatey on my nodes?
(I have the latest versions of everything, I have a new environment)
Can someone tell me what's the most efficient way to:
Install Chocolatey
Push packages
I tried installed Notepad++ with the chocolatey_package resource, but I get this error: No candidate version available for notepadplusplus (I get the error even after manually installing Choco on my node)
Used syntax in the recipe:
chocolatey_package [ 'notepadplusplus' ] do
action :install
end
The resource is a chef built-in that you can use without add third part
cookbook, but it’s only avaible after chef client 12.7 version.
And then when you add that cookbook into your dependences you add the
cookbook features to your recipes.
You don’t need add that cookbook if your chef client is 12.7 or higher
Many resources start out life in cookbooks and then once validated or of high enough utility, move into the core of chef. Assuming you’re on chef 12.7+ the choco package is definitely named “notepadplusplus” but for the name of the resource you are passing an array, try:
chocolatey_package "notepadplusplus" do
action :install
end
When I copied the text it also had “Smart Quotes” which can throw things for a loop so make sure you’re using standard single or double quotes in your recipes.
It appears that chocolatey_package does not install chocolatey. In fact, the error message suggests you use the chocolatey cookbook to install chocolately before using the chocolatey_package resource.