allow using --check on win_iis_webapppool module (#50528)
* allow using --check on win_iis_webapppool module * Added changelog and slight logic tweak * Fix typo in changelog fragment
This commit is contained in:
parent
3a9650df98
commit
23a751323b
2 changed files with 57 additions and 52 deletions
2
changelogs/fragments/win_iis_webapppool-check-mode.yaml
Normal file
2
changelogs/fragments/win_iis_webapppool-check-mode.yaml
Normal file
|
@ -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…
Reference in a new issue