Fix win_iis_virtualdirectory to remove a virtual directory that contains children (#56569)

* FIX #49755

* Added changelog fragment

* Changes according to review

* Fixed changelog
pull/57135/head
ShachafGoldstein 6 years ago committed by Jordan Borean
parent 1544924550
commit 486370a744

@ -0,0 +1,2 @@
bugfixes:
- "win_iis_virtualdirectory - Support recursive removal (https://github.com/ansible/ansible/issues/49755)"

@ -65,7 +65,7 @@ try {
# Remove directory # Remove directory
If ($state -eq 'absent' -and $directory) { If ($state -eq 'absent' -and $directory) {
Remove-Item $directory_path Remove-Item $directory_path -Recurse -Force
$result.changed = $true $result.changed = $true
} }

@ -24,6 +24,7 @@ options:
state: state:
description: description:
- Whether to add or remove the specified virtual directory. - Whether to add or remove the specified virtual directory.
- Removing will remove the virtual directory and all under it (Recursively).
type: str type: str
choices: [ absent, present ] choices: [ absent, present ]
default: present default: present

Loading…
Cancel
Save