From 1d10a2867c507f2eb2dcc3fe01e41fa8e9edbb07 Mon Sep 17 00:00:00 2001 From: Gianluca Date: Wed, 13 Dec 2017 07:34:44 +0100 Subject: [PATCH] Fixes #33771 - win_iis_webapppool bugfix (#33777) * Fixes #33771 * Fixes #33771 - mod 1 * removed some unneeded whitespace --- lib/ansible/modules/windows/win_iis_webapppool.ps1 | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/lib/ansible/modules/windows/win_iis_webapppool.ps1 b/lib/ansible/modules/windows/win_iis_webapppool.ps1 index 5f579297515..d95ba80bbd4 100644 --- a/lib/ansible/modules/windows/win_iis_webapppool.ps1 +++ b/lib/ansible/modules/windows/win_iis_webapppool.ps1 @@ -256,18 +256,6 @@ if ($state -eq "absent") { } # Set the state of the pool - if (($state -eq "stopped") -and ($pool.State -eq "Started")) { - if (-not $check_mode) { - try { - Stop-WebAppPool -Name $name - } catch { - Fail-Json $result "Failed to stop Web App Pool $($name): $($_.Exception.Message)" - } - } - $result.changed = $true - } - - if ($pool.State -eq "Stopped") { if ($state -eq "started" -or $state -eq "restarted") { if (-not $check_mode) {