allow using --check on win_iis_webapppool module (#50528) (#64812)

* allow using --check on win_iis_webapppool module

* Added changelog and slight logic tweak

* Fix typo in changelog fragment

(cherry picked from commit 23a751323b)
pull/64874/merge
Jordan Borean 5 years ago committed by Matt Davis
parent 07365b2040
commit f3c58f554c

@ -0,0 +1,2 @@
bugfixes:
- win_iis_webapppool - Do not try and set attributes in check mode when the pool did not exist

@ -201,6 +201,8 @@ if ($state -eq "absent") {
}
}
# Cannot run the below in check mode if the pool did not always exist
if ($pool) {
# Modify pool based on parameters
foreach ($attribute in $attributes.GetEnumerator()) {
$attribute_key = $attribute.Name
@ -269,6 +271,7 @@ if ($state -eq "absent") {
$result.changed = $true
}
}
}
}
# Get all the current attributes for the pool

Loading…
Cancel
Save