win_reg_stat: Clean up parameter handling (#21380)
This commit is contained in:
parent
958cbae7ba
commit
3c45c93d10
1 changed files with 6 additions and 6 deletions
|
@ -20,13 +20,13 @@
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
||||||
$params = Parse-Args $args -supports_check_mode $true
|
$params = Parse-Args $args -supports_check_mode $true
|
||||||
$key = Get-AnsibleParam $params "key" -FailIfEmpty $true
|
|
||||||
$property = Get-AnsibleParam $params "property" -FailIfEmpty $false -default $null
|
$key = Get-AnsibleParam -obj $params -name "key" -type "str" -failifempty $true
|
||||||
|
$property = Get-AnsibleParam -obj $params -name "property" -type "str"
|
||||||
|
|
||||||
$result = @{
|
$result = @{
|
||||||
win_reg_stat = @{}
|
|
||||||
changed = $false
|
changed = $false
|
||||||
warnings = @()
|
win_reg_stat = @{}
|
||||||
}
|
}
|
||||||
|
|
||||||
Function Get-NetHiveName($hive) {
|
Function Get-NetHiveName($hive) {
|
||||||
|
@ -36,7 +36,7 @@ Function Get-NetHiveName($hive) {
|
||||||
"HKCC" {"CurrentConfig"}
|
"HKCC" {"CurrentConfig"}
|
||||||
"HKCU" {"CurrentUser"}
|
"HKCU" {"CurrentUser"}
|
||||||
"HKLM" {"LocalMachine"}
|
"HKLM" {"LocalMachine"}
|
||||||
"HKU" {"Users"}
|
"HKU" {"Users"}
|
||||||
default {"unsupported"}
|
default {"unsupported"}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -118,7 +118,7 @@ if (Test-Path REGISTRY::$hive\$path) {
|
||||||
if ($real_property -eq $true) {
|
if ($real_property -eq $true) {
|
||||||
$property_object = Get-PropertyObject -hive $hive -net_hive $net_hive -path $path -property $property.Name
|
$property_object = Get-PropertyObject -hive $hive -net_hive $net_hive -path $path -property $property.Name
|
||||||
$property_info.Add($property.Name, $property_object)
|
$property_info.Add($property.Name, $property_object)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$sub_keys = @()
|
$sub_keys = @()
|
||||||
|
|
Loading…
Reference in a new issue