Chef cookbook to install chocolatey and packages on Windows
Ruby PowerShell
Latest commit 566b66d Aug 20, 2017 @mwrock mwrock Merge pull request #127 from chocolatey/rel-1.2.1
release 1.2.1
Permalink
Failed to load latest commit information.
.delivery Modernize testing + resolve all Foodcritic warnings (#116) Apr 18, 2017
.github Modernize testing + resolve all Foodcritic warnings (#116) Apr 18, 2017
attributes Dont install chocolatey every time May 4, 2017
files Use the official install.ps1 (#113) Jan 9, 2017
libraries fixes #118 and rename conflicting env_path method (#119) Apr 23, 2017
providers explicitly use the double-dash long option names Aug 16, 2017
recipes Use the official install.ps1 (#113) Jan 9, 2017
resources Modernize testing + resolve all Foodcritic warnings (#116) Apr 18, 2017
spec Use the official install.ps1 (#113) Jan 9, 2017
test add a chef 13 test on appveyor Apr 23, 2017
.gitattributes Use the official install.ps1 (#113) Jan 9, 2017
.gitignore Modernize testing + resolve all Foodcritic warnings (#116) Apr 18, 2017
.kitchen.appveyor.yml only delete choco if it is installed Aug 15, 2017
.kitchen.yml add a chef 13 test on appveyor Apr 23, 2017
.rspec In test-kitchen, install chocolatey behind proxy Nov 3, 2015
.rubocop.yml enforce lf line endings and bring in needed gems in a clean environment Aug 15, 2017
.travis.yml Modernize testing + resolve all Foodcritic warnings (#116) Apr 18, 2017
Berksfile adding kitchen test coverage to PATH tracking Nov 17, 2015
CHANGELOG.md release 1.2.1 Aug 20, 2017
Gemfile enforce lf line endings and bring in needed gems in a clean environment Aug 15, 2017
LICENSE Modernize testing + resolve all Foodcritic warnings (#116) Apr 18, 2017
README.md release 1.2.0 May 5, 2017
Rakefile Modernize testing + resolve all Foodcritic warnings (#116) Apr 18, 2017
appveyor.yml Modernize testing + resolve all Foodcritic warnings (#116) Apr 18, 2017
chefignore Modernize testing + resolve all Foodcritic warnings (#116) Apr 18, 2017
metadata.rb release 1.2.1 Aug 20, 2017

README.md

Cookbook Version Build Status

Description

Install Chocolatey with the default recipe and manage packages with a handy resource/provider.

Requirements

Platform:

  • Windows
  • Chef 11.6 or greater

Cookbooks:

  • windows (~> 1.38)

Notes

As of Chocolatey version 0.9.8.24 the install directory for Chocolatey has changed from C:\Chocolatey to C:\ProgramData\Chocolatey.

More information can be gotten from the Chocolateywiki.

Attributes

All attributes below are pre-pended with node['chocolatey']

Attribute Description Type Default
['upgrade'] Whether to upgrade Chocolatey if it's already installed Boolean false
['install_vars']['chocolateyProxyLocation'] HTTPS proxy for Chocolatey install script String Chef::Config['https_proxy'] or ENV['https_proxy']
['install_vars']['chocolateyProxyUser'] Proxy user for authenticating proxies String nil
['install_vars']['chocolateyProxyPassword'] Proxy user password String nil
['install_vars']['chocolateyVersion'] Version of Chocolatey to install, e.g. '0.9.9.11' String nil (download latest version)
['install_vars']['chocolateyDownloadUrl'] Chocolatey .nupkg file URL. Use this if you host an internal copy of the chocolatey.nupkg String https://chocolatey.org/api/v2/package/chocolatey (download from chocolatey.org)

Recipes

  • chocolatey::default

Resources

chocolatey

Note: On chef client versions 12.7.0 and greater, Use the chocolatey_package resource instead.

Actions

  • install: Install a chocolatey package (default)
  • remove: Uninstall a chocolatey package
  • upgrade: Update a chocolatey package

Resource Properties

  • package: package to manage (default name)
  • source: The source to find the package(s) to install
  • version: The version of the package to use.
  • args: arguments to the installation.
  • options: Hash of additional options to be sent to choco.exe

Examples

include_recipe 'chocolatey'

%w{sysinternals 7zip notepadplusplus GoogleChrome Console2}.each do |pack|
  chocolatey pack
end

%w{bash openssh grep}.each do |pack|
  chocolatey pack do
    source 'cygwin'
  end
end

chocolatey 'git.install' do
    options ({ 'params' => "'/GitOnlyOnPath'" })
end

chocolatey 'wireshark' do
  version '1.12.6'
  action :install
end

chocolatey "some_private_secure_package" do
  source "https://some.proget/feed"
  options ({'u' => 'username', 'p' => 'password'})
end

chocolatey 'DotNet4.5'

chocolatey 'PowerShell'

License and Maintainer

Maintainer:: Guilhem Lettron (guilhem@lettron.fr)

License:: Apache 2.0