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

* Improve handling of "restarted" state for win_iis_website module

* Added changelog fragment
This commit is contained in:
Artem Meshcheryakov 2019-11-13 07:24:25 +07:00 committed by Jordan Borean
parent 95d613f3ab
commit bd9a0b6700
2 changed files with 3 additions and 1 deletions

View file

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

View file

@ -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