From 78de05e58dcd68518241b3a2087c64245734a530 Mon Sep 17 00:00:00 2001 From: Dustin Spicuzza Date: Mon, 20 Mar 2017 21:54:24 +0000 Subject: [PATCH] win_iis_webapppool: Use Get-AnsibleParam to retrieve parameter - Fixes #22805 --- lib/ansible/modules/windows/win_iis_webapppool.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/windows/win_iis_webapppool.ps1 b/lib/ansible/modules/windows/win_iis_webapppool.ps1 index f68d69772d..b4f0cd4948 100644 --- a/lib/ansible/modules/windows/win_iis_webapppool.ps1 +++ b/lib/ansible/modules/windows/win_iis_webapppool.ps1 @@ -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) }