diff --git a/lib/ansible/modules/extras/windows/win_fw.ps1 b/lib/ansible/modules/extras/windows/win_fw.ps1 index 37e8935a23..fcdf34799f 100644 --- a/lib/ansible/modules/extras/windows/win_fw.ps1 +++ b/lib/ansible/modules/extras/windows/win_fw.ps1 @@ -202,7 +202,7 @@ if ((($direction.ToLower() -ne "In") -And ($direction.ToLower() -ne "Out")) -And $fwsettings.Add("Direction", $direction) }; if ((($action.ToLower() -ne "allow") -And ($action.ToLower() -ne "block")) -And ($state -eq "present")){ - $misArg+="Direction"; + $misArg+="Action"; $msg+=@("for the Action parameter only the values 'allow' and 'block' are allowed"); } else { $fwsettings.Add("Action", $action) @@ -225,6 +225,14 @@ foreach ($arg in $args){ }; }; +$profile=Get-Attr $params "profile" "all"; +if (($profile -ne 'current') -or ($profile -ne 'domain') -or ($profile -ne 'standard') -or ($profile -ne 'all') ) { + $misArg+="Profile"; + $msg+=@("for the Profile parameter only the values 'current', 'domain', 'standard' or 'all' are allowed"); +} else { + + $fwsettings.Add("profile", $profile) +} if ($($($misArg|measure).count) -gt 0){ $result=New-Object psobject @{ diff --git a/lib/ansible/modules/extras/windows/win_fw.py b/lib/ansible/modules/extras/windows/win_fw.py index 0566ef0608..59e1918ff5 100644 --- a/lib/ansible/modules/extras/windows/win_fw.py +++ b/lib/ansible/modules/extras/windows/win_fw.py @@ -88,6 +88,11 @@ options: - the protocol this rule applies to default: null required: false + profile: + describtion: + - the profile this rule applies to + default: all + choices: ['current', 'domain', 'standard', 'all'] force: description: - Enforces the change if a rule with different values exists @@ -107,4 +112,4 @@ EXAMPLES = ''' action: allow protocol: TCP -''' \ No newline at end of file +'''