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:
parent
95d613f3ab
commit
bd9a0b6700
2 changed files with 3 additions and 1 deletions
2
changelogs/fragments/win_iis_website-restarted.yaml
Normal file
2
changelogs/fragments/win_iis_website-restarted.yaml
Normal file
|
@ -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…
Reference in a new issue