Improve handling of "restarted" state for win_iis_website module (#63829)

* Improve handling of "restarted" state for win_iis_website module

* Added changelog fragment
pull/64665/head
Artem Meshcheryakov 5 years ago committed by Jordan Borean
parent 95d613f3ab
commit bd9a0b6700

@ -0,0 +1,2 @@
bugfixes:
- win_iis_website - Actually restart the site when ``state=restarted`` - https://github.com/ansible/ansible/issues/63828

@ -143,7 +143,7 @@ Try {
}
# Set run state
if (($state -eq 'stopped') -and ($site.State -eq 'Started'))
if ((($state -eq 'stopped') -or ($state -eq 'restarted')) -and ($site.State -eq 'Started'))
{
Stop-Website -Name $name -ErrorAction Stop
$result.changed = $true

Loading…
Cancel
Save