MelonSmasher / chef_yet_another_chocolatey_cookbook

YACC (Yet Another Chocolatey Cookbook), Manages many chocolatey packages through attributes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

YACC (Yet Another Chocolatey Cookbook)

Manages chocolatey packages through attributes.

Requirements

Depends

Platforms

  • Windows

Chef

  • Chef 12.0 or later

Attributes

Choco Free Features

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.

Choco Business Features

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
    }
  }
}

Usage

yacc::default

Just include yacc in your node's run_list:

{
  "name":"my_node",
  "run_list": [
    "recipe[yacc]"
  ]
}

About

YACC (Yet Another Chocolatey Cookbook), Manages many chocolatey packages through attributes.

License:MIT License


Languages

Language:Ruby 100.0%