Version information
This version is compatible with:
- Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
- Puppet >= 4.7.0 < 6.0.0
Start using this module
Add this module to your Puppetfile:
mod 'geoffwilliams-chocolatey', '3.0.1'
Learn more about managing modules with a PuppetfileDocumentation
Chocolatey Package Provider for Puppet
Customer hotfix module - do not use unless instructed
Chocolatey for Business Now Available!
We're excited for you to learn more about what's available in the Business editions!
Build Status
Travis | AppVeyor |
---|---|
Table of Contents
- Overview
- Module Description - What the chocolatey module does and why it is useful
- Setup - The basics of getting started with chocolatey
- Usage - Configuration options and additional functionality
- Reference
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
- Attributions
Overview
This is a Puppet package provider for Chocolatey, which is like apt-get, but for Windows. Check the module's metadata.json for compatible Puppet and Puppet Enterprise versions.
Module Description
This is the official module for working with the Chocolatey package manager.
This module supports all editions of Chocolatey, including FOSS, Professional and Chocolatey for Business.
This module is able to:
- Install Chocolatey
- Work with custom location installations
- Configure Chocolatey
- Use Chocolatey as a package provider
Why Chocolatey
Chocolatey closely mimics how package managers on other operating systems work. If you can imagine the built-in provider for Windows versus Chocolatey, take a look at the use case of installing git:
# Using built-in provider
package { "Git version 1.8.4-preview20130916":
ensure => installed,
source => 'C:\temp\Git-1.8.4-preview20130916.exe',
install_options => ['/VERYSILENT']
}
# Using Chocolatey (set as default for Windows)
package { 'git':
ensure => latest,
}
With the built-in provider:
- The package name must match exactly the name from installed programs.
- The package name has issues with unicode characters.
- The source must point to the location of the executable installer.
- It cannot
ensure => latest
. Read about handling versions and upgrades in the Puppet documentation.
With Chocolatey's provider:
- The package name only has to match the name of the package, which can be whatever you choose.
- The package knows how to install the software silently.
- The package knows where to get the executable installer.
- The source is able to specify different Chocolatey feeds.
- Chocolatey makes
package
more platform agnostic, because it looks exactly like other platforms.
For reference, read about the provider features available from the built-in provider, compared to other package managers:
Provider | holdable | install options | installable | package settings | purgeable | reinstallable | uninstall options | uninstallable | upgradeable | versionable | virtual packages |
---|---|---|---|---|---|---|---|---|---|---|---|
Windows | x | x | x | x | x | ||||||
Chocolatey | x | x | x | x | x | x | x | ||||
apt | x | x | x | x | x | x | x | ||||
yum | x | x | x | x | x | x | x |
Setup
What Chocolatey affects
Chocolatey affects your system and what software is installed on it, ranging from tools and portable software, to natively installed applications.
Setup Requirements
Chocolatey requires the following components:
- Powershell v2+ (Installed on most systems by default)
- .NET Framework v4+
Beginning with Chocolatey provider
Install this module via any of these approaches:
- Puppet Forge
- git-submodule (tutorial)
- librarian-puppet
- r10k
Usage
Manage Chocolatey installation
Ensure Chocolatey is installed and configured:
include chocolatey
Override default Chocolatey install location
class {'chocolatey':
choco_install_location => 'D:\secured\choco',
}
NOTE: This will affect suitability on first install. There are also
special considerations for C:\Chocolatey
as an install location, see
choco_install_location
for details.
Use an internal chocolatey.nupkg for Chocolatey installation
class {'chocolatey':
chocolatey_download_url => 'https://internalurl/to/chocolatey.nupkg',
use_7zip => false,
choco_install_timeout_seconds => 2700,
}
Use a file chocolatey.0.9.9.9.nupkg for installation
class {'chocolatey':
chocolatey_download_url => 'file:///c:/location/of/chocolatey.0.9.9.9.nupkg',
use_7zip => false,
choco_install_timeout_seconds => 2700,
}
Specify the version of chocolatey by class parameters
class {'chocolatey':
chocolatey_download_url => 'file:///c:/location/of/chocolatey.0.9.9.9.nupkg',
use_7zip => false,
choco_install_timeout_seconds => 2700,
chocolatey_version => '0.9.9.9',
}
Log chocolatey bootstrap installer script output
class {'chocolatey':
log_output => true,
}
Install chocolatey using a proxy server
class {'chocolatey':
install_proxy => 'http://proxy.megacorp.com:3128',
}
### Configuration
If you have Chocolatey 0.9.9.x or above, you can take advantage of configuring different aspects of Chocolatey.
#### Sources Configuration
You can specify sources that Chocolatey uses by default, along with priority.
Requires Chocolatey v0.9.9.0+.
##### Disable the default community repository source
~~~puppet
chocolateysource {'chocolatey':
ensure => disabled,
}
Set a priority on a source
chocolateysource {'chocolatey':
ensure => present,
location => 'https://chocolatey.org/api/v2',
priority => 1,
}
Add credentials to a source
chocolateysource {'sourcename':
ensure => present,
location => 'https://internal/source',
user => 'username',
password => 'password',
}
NOTE: Chocolatey encrypts the password in a way that is not verifiable. If you need to rotate passwords, you cannot use this resource to do so unless you also change the location, user, or priority (because those are ensurable properties).
Features Configuration
You can configure features that Chocolatey has available. Run
choco feature list
to see the available configuration features.
Requires Chocolatey v0.9.9.0+.
Enable Auto Uninstaller
Uninstall from Programs and Features without requiring an explicit uninstall script.
chocolateyfeature {'autouninstaller':
ensure => enabled,
}
Disable Use Package Exit Codes
Requires 0.9.10+ for this feature.
Use Package Exit Codes - Allows package scripts to provide exit codes. With this enabled, Chocolatey uses package exit codes for exit when non-zero (this value can come from a dependency package). Chocolatey defines valid exit codes as 0, 1605, 1614, 1641, 3010. With this feature disabled, Chocolatey exits with a 0 or a 1 (matching previous behavior).
chocolateyfeature {'usepackageexitcodes':
ensure => disabled,
}
Enable Virus Check
Requires 0.9.10+ and Chocolatey Pro / Business for this feature.
Virus Check - Performs virus checking on downloaded files. (Licensed versions only.)
chocolateyfeature {'viruscheck':
ensure => enabled,
}
Enable FIPS Compliant Checksums
Requires 0.9.10+ for this feature.
Use FIPS Compliant Checksums - Ensures checksumming done by Chocolatey uses FIPS compliant algorithms. Not recommended unless required by FIPS Mode. Enabling on an existing installation could have unintended consequences related to upgrades or uninstalls.
chocolateyfeature {'usefipscompliantchecksums':
ensure => enabled,
}
Config configuration
You can configure config values that Chocolatey has available. Run
choco config list
to see the config settings available (just the
config settings section).
Requires Chocolatey v0.9.10.0+.
Set cache location
The cache location defaults to the TEMP directory. You can set an explicit directory to cache downloads to instead of the default.
chocolateyconfig {'cachelocation':
value => "c:\\downloads",
}
Unset cache location
Removes cache location setting, returning the setting to its default.
chocolateyconfig {'cachelocation':
ensure => absent,
}
Use an explicit proxy
When using Chocolatey behind a proxy, set proxy
and optionally
proxyUser
and proxyPassword
.
NOTE: The proxyPassword
value is not verifiable.
chocolateyconfig {'proxy':
value => 'https://someproxy.com',
}
chocolateyconfig {'proxyUser':
value => 'bob',
}
# not verifiable
chocolateyconfig {'proxyPassword':
value => 'securepassword',
}
Set Chocolatey as Default Windows Provider
If you want to set this provider as the site-wide default,
add to your site.pp
:
if $::kernel == 'windows' {
Package { provider => chocolatey, }
}
# OR
case $operatingsystem {
'windows': {
Package { provider => chocolatey, }
}
}
Packages
With all options
package { 'notepadplusplus':
ensure => installed|latest|'1.0.0'|absent,
provider => 'chocolatey',
install_options => ['-pre','-params','"','param1','param2','"'],
uninstall_options => ['-r'],
source => 'https://myfeed.example.com/api/v2',
}
- Supports
installable
anduninstallable
. - Supports
versionable
so thatensure => '1.0'
works. - Supports
upgradeable
. - Supports
latest
(checks upstream),absent
(uninstall). - Supports
install_options
for pre-release, and other command-line options. - Supports
uninstall_options
for pre-release, and other command-line options. - Supports
holdable
, requires Chocolatey v0.9.9.0+.
Simple install
package { 'notepadplusplus':
ensure => installed,
provider => 'chocolatey',
}
To always ensure using the newest version available
package { 'notepadplusplus':
ensure => latest,
provider => 'chocolatey',
}
To ensure a specific version
package { 'notepadplusplus':
ensure => '6.7.5',
provider => 'chocolatey',
}
To specify custom source
package { 'notepadplusplus':
ensure => '6.7.5',
provider => 'chocolatey',
source => 'C:\local\folder\packages',
}
package { 'notepadplusplus':
ensure => '6.7.5',
provider => 'chocolatey',
source => '\\unc\source\packages',
}
package { 'notepadplusplus':
ensure => '6.7.5',
provider => 'chocolatey',
source => 'https://custom.nuget.odata.feed/api/v2/',
}
package { 'notepadplusplus':
ensure => '6.7.5',
provider => 'chocolatey',
source => 'C:\local\folder\packages;https://chocolatey.org/api/v2/',
}
Install options with spaces
Spaces in arguments must always be covered with a separation. Shown
below is an example of how you configure -installArgs "/VERYSILENT /NORESTART"
.
package {'launchy':
ensure => installed,
provider => 'chocolatey',
install_options => ['-override', '-installArgs', '"', '/VERYSILENT', '/NORESTART', '"'],
}
Install options with quotes or spaces
The underlying installer may need quotes passed to it. This is possible, but not
as intuitive. The example below covers passing /INSTALLDIR="C:\Program Files\somewhere"
.
For this to be passed through with Chocolatey, you need a set of double
quotes surrounding the argument and two sets of double quotes surrounding the
item that must be quoted (see how to pass/options/switches). This makes the
string look like -installArgs "/INSTALLDIR=""C:\Program Files\somewhere"""
for
proper use with Chocolatey.
Then, for Puppet to handle that appropriately, you must split on every space. Yes, on every space you must split the string or the result comes out incorrectly. This means it will look like the following:
install_options => ['-installArgs',
'"/INSTALLDIR=""C:\Program', 'Files\somewhere"""']
Make sure you have all of the right quotes - start it off with a single double quote, then two double quotes, then close it all by closing the two double quotes and then the single double quote or a possible three double quotes at the end.
package {'mysql':
ensure => latest,
provider => 'chocolatey',
install_options => ['-override', '-installArgs',
'"/INSTALLDIR=""C:\Program', 'Files\somewhere"""'],
}
You can split it up a bit for readability if it suits you:
package {'mysql':
ensure => latest,
provider => 'chocolatey',
install_options => ['-override', '-installArgs', '"'
'/INSTALLDIR=""C:\Program', 'Files\somewhere""',
'"'],
}
Note: The above is for Chocolatey v0.9.9+. You may need to look for an alternative method to pass args if you have 0.9.8.x and below.
Reference
Classes
Public classes
Private classes
chocolatey::install.pp
: Ensures Chocolatey is installed.chocolatey::config.pp
: Ensures Chocolatey is configured.
Facts
chocolateyversion
- The version of the installed Chocolatey client (could also be provided by class parameterchocolatey_version
).choco_install_path
- The location of the installed Chocolatey client (could also be provided by class parameterchoco_install_location
).
Types/Providers
Package provider: Chocolatey
Chocolatey implements a package type with a resource provider, which is built into Puppet.
This provider supports the install_options
and uninstall_options
attributes,
which allow command-line options to be passed to the choco
command. These options
should be specified as documented below.
- Required binaries:
choco.exe
, usually found inC:\Program Data\chocolatey\bin\choco.exe
.- The binary is searched for using the environment variable
ChocolateyInstall
, then by two known locations (C:\Chocolatey\bin\choco.exe
andC:\ProgramData\chocolatey\bin\choco.exe
).
- The binary is searched for using the environment variable
- Supported features:
install_options
,installable
,uninstall_options
,uninstallable
,upgradeable
,versionable
.
NOTE: the root of C:\
is not a secure location by default, so you may want to update the security on the folder.
Properties/Parameters
ensure
(Property: This attribute represents a concrete state on the target system.)
Specifies what state the package should be in. You can choose which package to retrieve by
specifying a version number or latest
as the ensure value. Valid options: present
(also called installed
), absent
, latest
,
held
or a version number. Default: installed
.
install_options
Specifies an array of additional options to pass when installing a package. These options are
package-specific, and should be documented by the software vendor. One commonly
implemented option is INSTALLDIR
:
package {'launchy':
ensure => installed,
provider => 'chocolatey',
install_options => ['-installArgs', '"', '/VERYSILENT', '/NORESTART', '"'],
}
NOTE: The above method of single quotes in an array is the only method you should use
in passing install_options
with the Chocolatey provider. There are other ways
to do it, but they are passed through to Chocolatey in ways that may not be
sufficient.
This is the only place in Puppet where backslash separators should be used. Note that backslashes in double-quoted strings must be double-escaped and backslashes in single-quoted strings may be double-escaped.
name
Specifies the package name. This is the name that the packaging system uses internally. Valid options: String. Default: The resource's title.
provider
Required. Sets the specific backend to use for the package
resource. Chocolatey is not the
default provider for Windows, so it must be specified (or by using a resource
default, shown in the Usage section above). Valid options: 'chocolatey'
.
source
Specifies where to find the package file. Use this to override the default source(s). Valid options: String of either an absolute path to a local directory containing packages stored on the target system, a URL (to OData feeds), or a network drive path. Chocolatey maintains default sources in its configuration file that it uses by default.
Puppet will not automatically retrieve source files for you, and
usually just passes the value of the source to the package installation command.
You can use a file
resource if you need to manually copy package files to the
target system.
uninstall_options
Specifies an array of additional options to pass when uninstalling a package. These options are package-specific, and should be documented by the software vendor.
package {'launchy':
ensure => absent,
provider => 'chocolatey',
uninstall_options => ['-uninstallargs', '"', '/VERYSILENT', '/NORESTART', '"'],
}
The above method of single quotes in an array is the only method you should use
in passing uninstall_options
with the Chocolatey provider. There are other ways
to do it, but they are passed to Chocolatey in ways that may not be
sufficient.
NOTE: This is the only place in Puppet where backslash separators should be used. Backslashes in double-quoted strings must be double-escaped and backslashes in single-quoted strings may be double-escaped.
ChocolateySource
Allows managing default sources for Chocolatey. A source can be a folder, a CIFS share, a NuGet Http OData feed, or a full Package Gallery. Learn more about sources at How To Host Feed. Requires Chocolatey v0.9.9.0+.
Properties/Parameters
name
Specifies the name of the source. Used for uniqueness. Also sets the location
to this value if location
is unset. Valid options: String. Default: The resource's title.
ensure
(Property: This parameter represents a concrete state on the target system.)
Specifies what state the source should be in. Default: present
. Valid options: present
, disabled
, or absent
. disabled
should only be used with existing sources.
location
(Property: This parameter represents a concrete state on the target system.)
Specifies the location of the source repository. Valid options: String of a URL pointing to an OData feed (such as chocolatey/chocolatey_server), a CIFS (UNC) share, or a local folder. Required when ensure => present
(present
is default value for ensure
).
user
(Property: This parameter represents a concrete state on the target system.)
Specifies an optional user name for authenticated feeds. Requires at least Chocolatey v0.9.9.0. Default: nil
. Specifying an empty value is the same as setting the value to nil
or not specifying the property at all.
password
Specifies an optional user password for authenticated feeds. Not ensurable. Value cannot be checked with current value. If you need to update the password, update another setting as well to force the update. Requires at least Chocolatey v0.9.9.0. Default: nil
. Specifying an empty value is the same as setting the value to nil
or not specifying the property at all.
priority
(Property: This parameter represents a concrete state on the target system.)
Specifies an optional priority for explicit feed order when searching for packages across multiple feeds. The lower the number, the higher the priority. Sources with a 0 priority are considered no priority and are added after other sources with a priority number. Requires at least Chocolatey v0.9.9.9. Default: 0
.
ChocolateyFeature
Allows managing features for Chocolatey. Features are configurations that act as switches to turn on or off certain aspects of how Chocolatey works. Learn more about features in the Chocolatey documentation. Requires Chocolatey v0.9.9.0+.
Properties/Parameters
name
Specifies the name of the feature. Used for uniqueness. Valid options: String. Default: The resource's title.
ensure
(Property: This parameter represents a concrete state on the target system.)
Specifies what state the feature should be in. Valid options: enabled
or disabled
. Default: disabled
.
ChocolateyConfig
Allows managing config settings for Chocolatey. Configuration values provide settings for users to configure aspects of Chocolatey and the way it functions. Similar to features, except allow for user configured values. Learn more about config settings at Config. Requires Chocolatey v0.9.9.9+.
Properties/Parameters
name
(Namevar: If ommitted, this parameter's value will default to the resource's title.)
Specifies the name of the config setting. Used for uniqueness. Puppet is not able to easily manage any values that include "password" in the key name because they will be encrypted in the configuration file.
ensure
(Property: This parameter represents a concrete state on the target system.)
Specifies what state the config should be in. Valid options: present
or absent
. Default: present
.
value
(Property: This parameter represents a concrete state on the target system.)
Specifies the value of the config setting. If the name includes "password", then the value is not ensurable due to being encrypted in the configuration file.
Class: chocolatey
Manages installation and configuration of Chocolatey itself.
Parameters
choco_install_location
Specifies where Chocolatey install should be located. Valid options: Must be an absolute path starting with a drive letter, for example: c:\
. Default: The currently detected install location based on the ChocolateyInstall
environment variable. If not specified, falls back to 'C:\ProgramData\chocolatey'
.
NOTE: Puppet can install Chocolatey and configure Chocolatey install packages during the same run UNLESS you specify this setting. This is due to the way the providers search for suitability of the command, falling back to the default install for the executable when none is found. Because environment variables and commands do not refresh during the same Puppet run (due somewhat to a Windows limitation with updating environment information for currently running processes), installing to a directory that is not the default won't be detected until the next time Puppet runs. So unless you really want this installed elsewhere and don't have a current existing install in that non-default location, do not set this value.
Specifying C:\Chocolatey
as the install directory will trigger Chocolatey to attempt to upgrade that directory. This is due to that location being the original install location for Chocolatey before it was moved to another directory and subsequently locked down. If you need this to be the installation directory, please define an environment variable ChocolateyAllowInsecureRootDirectory
and set it to 'true'
. For more information, please see the CHANGELOG for 0.9.9.
If you override the default installation directory you need to set appropriate permissions on that install location, because Chocolatey does not restrict access to the custom directory to only Administrators. Chocolatey only restricts access to the directory in the default install location, to avoid permissions issues with custom locations, among other reasons. See "Can I install Chocolatey to another location?" for more information.
use_7zip
Specifies whether to use the built-in shell or allow the installer to download 7zip to extract chocolatey.nupkg
during installation. Valid options: true
, false
. Default: false
.
choco_install_timeout_seconds
Specifies how long in seconds should be allowed for the install of Chocolatey (including .NET Framework 4 if necessary). Valid options: Number. Default: 1500
(25 minutes).
chocolatey_download_url
Specifies the URL that returns chocolatey.nupkg
. Valid options: String of URL, not necessarily from an OData feed. Any URL location will work, but it must result in the chocolatey nupkg file being downloaded. Default: 'https://chocolatey.org/api/v2/package/chocolatey/'
.
enable_autouninstaller
Only for 0.9.9.x users. Chocolatey 0.9.10.x+ ignores this setting. Specifies whether auto uninstaller is enabled. Auto uninstaller allows Chocolatey to automatically manage the uninstall of software from Programs and Features without necessarily requiring a chocolateyUninstall.ps1
file in the package. Valid options: true
, false
. Default: true
.
log_output
Specifies whether to log output from the installer. Valid options: true
, false
. Default: false
.
Limitations
- Works with Windows only.
- If you override an existing install location of Chocolatey using
choco_install_location =>
in the Chocolatey class, it does not bring any of the existing packages with it. You will need to handle that through some other means. - Overriding the install location will also not allow Chocolatey to be configured or install packages on the same run that it is installed on. See
choco_install_location
for details.
Known Issues
- This module doesn't support side by side scenarios.
- This module may have issues upgrading Chocolatey itself using the package resource.
- If .NET 4.0 is not installed, it may have trouble installing Chocolatey. Chocolatey version 0.9.9.9+ helps alleviate this issue.
- If there is an error in the installer (
InstallChocolatey.ps1.erb
), it may not show as an error. This may be an issue with the PowerShell provider and is still under investigation.
Development
Puppet Inc modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can’t access the huge number of platforms and myriad of hardware, software, and deployment configurations that Puppet is intended to serve.
We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.
For more information, see our module contribution guide.
Attributions
A special thanks goes out to Rich Siegel and Rob Reynolds who wrote the original provider and continue to contribute to the development of this provider.
Types in this module release
2017-06-02 Supported Release 3.0.0
Summary
Major release which removes support for older versions of Puppet-Agent.
Bug Fixes
- Fix: Explicitly close configuration files after reading (MODULES-4678)
- Fix: Use actual choco.exe instead of the shim (MODULES-4562)
- Fix: Updated puppet version compatibility for modern Puppet agents (MODULES-4846)
2017-04-04 Supported Release 2.0.2
Summary
This is a bug fix release.
Bug Fixes
- Fix: Use two dashes when getting package version (MODULES-4508)
2017-01-03 Supported Release 2.0.1
Summary
This is a bug fix release, correcting some issues in the original supported release and one that was introduced by the switchover to the puppetlabs-powershell v2 module.
Bug Fixes
- Fix: ChocolateyInstall environment variable not set for alternate installation directory (MODULES-4091)
- Fix: Unsuitable providers should not cause errors (MODULES-4149)
- Fix: version is malformed with any extraneous messages (MODULES-4135)
- Fix: module does not propagate null source error correctly (MODULES-4056)
- Fix: install fails on Windows 10 when using built-in compression (MODULES-4210)
Improvements
- Set TLS 1.1+ when available
- Document considerations for install to "C:\Chocolatey" (MODULES-4090)
2016-09-29 First Supported Release 2.0.0
Summary
Puppetlabs-Chocolatey is now a supported module! This includes everything from the approved chocolatey-chocolatey module, plus the improvements in the unsupported releases 0.7.0 and 0.8.0. It also adds the following additional changes and fixes.
Features
chocolateysource
- explicitly require location in ensure (MODULES-3430)- set ignore package exit codes when Chocolatey is on version 0.9.10+ (MODULES-3880)
Bug Fixes
- Fix: Ensure config file exists before
chocolateyfeature
,chocolateyconfig
, orchocolateysource
(MODULES-3677) - Fix:
chocolateysource
- ensure flush when disabling source (MODULES-3430) - Fix:
chocolateysource
- erroneous user sync messages (MODULES-3758)
2016-07-13 Unsupported Release 0.8.0
This brings the unsupported puppetlabs-chocolatey provider on par with the approved chocolatey-chocolatey at 1.2.6 and adds additional features.
- Includes community module releases up to 1.2.6 (changelog below).
- Manage features -
chocolateyfeature
- see MODULES-3034 - Manage config settings -
chocolateyconfig
- see MODULES-3035
2016-06-01 Unsupported Release 0.7.0
- Manage sources -
chocolateysource
- see MODULES-3037 - Includes community module releases up to 1.2.1 (changelog below up to 1.2.1), plus these additional fixes:
Approved Community Module Changelog - Chocolatey Team
The Chocolatey team has graciously agreed to allow Puppet to take this module to the next level. Puppet will rerelease a supported module under the original versioning scheme. For now we are using a number less than 1.0 to show that this could have some technical issues and should be treated as a prerelease version.
2016-07-11 Release 1.2.6
- Fix - AutoUninstaller runs every time in 0.9.9.x #134
2016-06-20 Release 1.2.5
- Support feature list changes in v0.9.10+ #133
- Fix - Chocolatey fails to install in PowerShell v2 with PowerShell Module 1.x #128
2016-06-04 Release 1.2.4
- Compatibility with puppetlabs-powershell 2.x #125.
2016-05-06 Release 1.2.3
- Do not call choco with --debug --verbose by default #100.
- Announce Chocolatey for Business in ReadMe.
2016-05-06 Release 1.2.3
- Do not call choco with --debug --verbose by default #100.
- Announce Chocolatey for Business in ReadMe.
2016-04-06 Release 1.2.2
- Fix: puppet apply works again #105.
$::chocolateyversion
fact is optional - see #110- Fix: Implement PowerShell Redirection Fix for Windows 2008 / PowerShell v2 - see #119
2015-12-08 Release 1.2.1
- Small release for support of newer PE versions.
##2015-11-03 Release 1.2.0
2015-10-02 Release 1.1.2
- Ensure 0.9.9.9 compatibility (#94)
- Fix - Mixed stale environment variables of existing choco install causing issues (#86)
- Upgrade From POSH Version of Chocolatey Fails from Puppet (#60)
2015-09-25 Release 1.1.1
- Add log_output for chocolatey bootstrap installer script
- Ensure bootstrap enforces chocolatey.nupkg in libs folder
- Allow file location for installing nupkg file.
2015-09-09 Release 1.1.0
- Install Chocolatey itself / ensure Chocolatey is installed (PUP-1691)
- Adds custom facts for chocolateyversion and choco_install_path
2015-07-23 Release 1.0.2
- Fixes #71 - Allow
ensure => $version
to work with already installed packages
2015-07-01 Release 1.0.1
- Fixes #66 - Check for choco existence more comprehensively
2015-06-08 Release 1.0.0
- No change, bumping to 1.0.0
2015-05-22 Release 0.5.3
- Fix manifest issue
- Fix choco path issue
- Update ReadMe - fix/clarify how options with quotes need to be passed.
2015-04-23 Release 0.5.2
- Update ReadMe
- Add support for Windows 10.
- Fixes #56 - Avoiding puppet returning 2 instead of 0 when there are no changes to be done.
2015-03-31 Release 0.5.1
- Fixes #54 - Blocking: Linux masters throw error if module is present
2015-03-30 Release 0.5.0
- Provider enhancements
- Better docs
- Works with both compiled and powershell Chocolatey clients
- Fixes #50 - work with newer compiled Chocolatey client (0.9.9+)
- Fixes #43 - check for installed packages is case sensitive
- Fixes #18 - The OS handle's position is not what FileStream expected.
- Fixes #52 - Document best way to pass options with spaces (#15 also related)
- Fixes #26 - Document Chocolatey needs to be installed by other means
Dependencies
- puppetlabs/stdlib (>= 4.6.0 < 5.0.0)
- puppetlabs/powershell (>= 1.0.1 < 3.0.0)
- puppetlabs/registry (>= 1.0.0 < 3.0.0)
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.