Manages chocolatey packages through attributes.
- chocolatey ~> 1.2.0
- Windows
- Chef 12.0 or later
Set the chocolatey default sources:
Default:
{
"chocolatey": {
"source": "https://chocolatey.org/api/v2/",
"action": "present",
"priority": 0
}
}
Example:
{
"yacc" : {
"default_sources" : {
"private": {
"source": "https://repo.private.com/api/v2/",
"action": "present",
"user": "some_user",
"password": "some_password",
"priority": 1
},
"private2": {
"source": "https://repo2.private.com/api/v2/",
"action": "disabled",
"priority": 99
},
"private3": {
"source": "https://repo3.private.com/api/v2/",
"action": "absent",
"priority": 100
},
"chocolatey": {
"source": "https://chocolatey.org/api/v2/",
"action": "present",
"priority": 0
}
}
}
}
Set config options(Default: {}
):
Valid actions: set|unset
Example:
{
"yacc" : {
"config" : {
"cacheLocation": {
"action": "set",
"value": "C:\\tmp"
}
}
}
}
Determine if failures should be ignored(Default: false
):
{
"yacc" : {
"ignore_failure" : true
}
}
Global install options that will be run with each choco install (Default: {}
)
{
"yacc" : {
"install_options" : [
"--cachelocation C:\\tmp"
]
}
}
Define packages:
{
"yacc" : {
"packages" : {
"googlechrome": {
"action": "56.0.2924.76",
"install_options": [
"--ignorechecksum",
"--allow-downgrade"
]
},
"firefox": {
"action": "upgrade"
},
"chocolateygui": {
"action": "purge"
}
}
}
}
The action
field follows the same actions as this documentation, it also can take a version number.
Synchronize all installed software with Chocolatey (** requires Chocolatey for Business **):
(Default: false
)
{
"yacc" : {
"business" : {
"synchronize": true
}
}
}
Uninstall arbitrary software from programs and features (** requires Chocolatey for Business **):
{
"yacc" : {
"business" : {
"uninstall_from_programs": [
"NSClient++ (x64)",
"Puppet *"
]
}
}
}
Optimize the Choco packages and the cache by removing unused files and reducing package file sizes (** requires Chocolatey for Business **):
(Default: false
)
{
"yacc" : {
"business" : {
"optimize": true
}
}
}
Just include yacc
in your node's run_list
:
{
"name":"my_node",
"run_list": [
"recipe[yacc]"
]
}