This commit is contained in:
Trond Hindenes 2015-10-01 19:08:42 +02:00
parent 962afeed54
commit 161b3cf1e1
2 changed files with 10 additions and 5 deletions

View file

@ -1237,10 +1237,15 @@ Set-Attr $result "changed" $false;
$path = Get-Attr -obj $params -name path -failifempty $true -resultobj $result $path = Get-Attr -obj $params -name path -failifempty $true -resultobj $result
$name = Get-Attr -obj $params -name name -default $path $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 $arguments = Get-Attr -obj $params -name arguments
$ensure = Get-Attr -obj $params -name state -default "present" $ensure = Get-Attr -obj $params -name state -default "present"
if (!$ensure) if ($ensure -eq $null)
{ {
$ensure = Get-Attr -obj $params -name ensure -default "present" $ensure = Get-Attr -obj $params -name ensure -default "present"
} }

View file

@ -44,9 +44,9 @@ options:
product_id: product_id:
description: description:
- product id of the installed package (used for checking if already installed) - product id of the installed package (used for checking if already installed)
required: false required: true
default: null default: null
aliases: [] aliases: [productid]
arguments: arguments:
description: description:
- Any arguments the installer needs - Any arguments the installer needs
@ -79,7 +79,7 @@ EXAMPLES = '''
win_package: win_package:
name="Microsoft Visual C thingy" name="Microsoft Visual C thingy"
path="http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe" 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" Arguments="/install /passive /norestart"