* Refactor code to be more robust. Run main logic inside a try {} catch {}
block. If there is any error, bail out and log all the command output
automatically.
* Rely on error code generated by chocolatey instead of scraping text
output to determine success/failure.
* Add support for unattended installs: (`-y` flag is a requirement by
chocolatey)
* Before (un)installing, check existence of files.
* Use functions to abstract logic
* The great rewrite of 0.9.9, the `choco` interface has changed, check
if chocolatey is installed and an older version. If so upgrade to
latest.
* Allow upgrading packages that are already installed
* Use verbose logging for chocolate actions
* Adding functionality to specify a source for a chocolatey repository.
(@smadam813)
* Removing pre-determined sources and adding specified source url in
it's place. (@smadam813)
Contains contributions from:
* Adam Keech <akeech@chathamfinancial.com> (@smadam813)
This changes the get-attr function slightly, and lets the module specify whether a param is needed and auto-fails if it is not present. A module can now verify params like so::
$params = Parse-Args $args;
$result = New-Object psobject;
Set-Attr $result "changed" $false;
$path = Get-Attr -obj $params -name path -failifempty $true -resultobj $result
or
$params = Parse-Args $args;
$result = New-Object psobject;
Set-Attr $result "changed" $false;
$path = Get-Attr -obj $params -name path -failifempty $true -emptyattributefailmessage "Oh man. You forgot the main part!" -resultobj $result
slight tweak in how the powershell module converts to json in order to support nested objects (allows for more complex facts, among others)
This script gathers some extended facts on windows hosts in a json array attribute called "ansible_interfaces". This info is needed for some network-related modules I'm working on. Required the update to powershell.ps1 to return deeply nested json objects.