1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

win_iis_webapppool: Use Get-AnsibleParam to retrieve parameter

- Fixes #22805
This commit is contained in:
Dustin Spicuzza 2017-03-20 21:54:24 +00:00 committed by Toshio Kuratomi
parent ee478c4885
commit 78de05e58d

View file

@ -32,8 +32,9 @@ $state = Get-AnsibleParam -obj $params -name "state" -default "present" -validat
# Attributes parameter - Pipe separated list of attributes where
# keys and values are separated by comma (paramA:valyeA|paramB:valueB)
$attributes = @{};
If (Get-Member -InputObject $params -Name attributes) {
$params.attributes -split '\|' | foreach {
$attrs = Get-AnsibleParam -obj $params -name "attributes" -type "string" -failifempty $false
If ($attrs) {
$attrs -split '\|' | foreach {
$key, $value = $_ -split "\:"
$attributes.Add($key, $value)
}