diff --git a/lib/ansible/modules/extras/windows/win_firewall_rule.ps1 b/lib/ansible/modules/extras/windows/win_firewall_rule.ps1 index 63ac538e37..21f96bcf33 100644 --- a/lib/ansible/modules/extras/windows/win_firewall_rule.ps1 +++ b/lib/ansible/modules/extras/windows/win_firewall_rule.ps1 @@ -212,6 +212,7 @@ $action=Get-Attr $params "action" ""; $misArg = '' # Check the arguments if ($enable -ne $null) { + $enable=ConvertTo-Bool $enable; if ($enable -eq $true) { $fwsettings.Add("Enabled", "yes"); } elseif ($enable -eq $false) { diff --git a/lib/ansible/modules/extras/windows/win_firewall_rule.py b/lib/ansible/modules/extras/windows/win_firewall_rule.py index 03611a60ef..2f90e2a673 100644 --- a/lib/ansible/modules/extras/windows/win_firewall_rule.py +++ b/lib/ansible/modules/extras/windows/win_firewall_rule.py @@ -114,10 +114,11 @@ EXAMPLES = ''' action: win_firewall_rule args: name: smtp - enabled: yes + enable: yes state: present localport: 25 action: allow + direction: In protocol: TCP '''