From 161b3cf1e1245aa3769692338952f609cab658a8 Mon Sep 17 00:00:00 2001 From: Trond Hindenes Date: Thu, 1 Oct 2015 19:08:42 +0200 Subject: [PATCH 1/2] fixes #984 --- windows/win_package.ps1 | 9 +++++++-- windows/win_package.py | 6 +++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/windows/win_package.ps1 b/windows/win_package.ps1 index 02bb908a944..6cdc6bf6e5c 100644 --- a/windows/win_package.ps1 +++ b/windows/win_package.ps1 @@ -1237,10 +1237,15 @@ Set-Attr $result "changed" $false; $path = Get-Attr -obj $params -name path -failifempty $true -resultobj $result $name = Get-Attr -obj $params -name name -default $path -$productid = Get-Attr -obj $params -name productid -failifempty $true -resultobj $result +$productid = Get-Attr -obj $params -name productid +if ($productid -eq $null) +{ + #Alias added for backwards compat. + $productid = Get-Attr -obj $params -name product_id -failifempty $true -resultobj $result +} $arguments = Get-Attr -obj $params -name arguments $ensure = Get-Attr -obj $params -name state -default "present" -if (!$ensure) +if ($ensure -eq $null) { $ensure = Get-Attr -obj $params -name ensure -default "present" } diff --git a/windows/win_package.py b/windows/win_package.py index d20e5ee8816..842aa0693d4 100644 --- a/windows/win_package.py +++ b/windows/win_package.py @@ -44,9 +44,9 @@ options: product_id: description: - product id of the installed package (used for checking if already installed) - required: false + required: true default: null - aliases: [] + aliases: [productid] arguments: description: - Any arguments the installer needs @@ -79,7 +79,7 @@ EXAMPLES = ''' win_package: name="Microsoft Visual C thingy" path="http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe" - ProductId="{CF2BEA3C-26EA-32F8-AA9B-331F7E34BA97}" + Product_Id="{CF2BEA3C-26EA-32F8-AA9B-331F7E34BA97}" Arguments="/install /passive /norestart" From 7c48fe617df1ea9ba324bec8d7a724055fa04a34 Mon Sep 17 00:00:00 2001 From: Trond Hindenes Date: Thu, 1 Oct 2015 19:12:21 +0200 Subject: [PATCH 2/2] added module author --- windows/win_package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/windows/win_package.py b/windows/win_package.py index 842aa0693d4..68497d5ba4f 100644 --- a/windows/win_package.py +++ b/windows/win_package.py @@ -25,6 +25,7 @@ DOCUMENTATION = ''' --- module: win_package version_added: "1.7" +author: Trond Hindenes short_description: Installs/Uninstalls a installable package, either from local file system or url description: - Installs or uninstalls a package