From 05322334b059813622c48c979109b6861ad46584 Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Mon, 7 Jan 2019 19:46:56 +0100 Subject: [PATCH] win_firewall_rule: Remove invalid 'bypass' action (2.7 backport) (#50222) * win_firewall_rule: Remove invalid 'bypass' action This fixes #50143 * Add changelog fragment --- .../fragments/50143-win_firewall_rule-invalid-bypass.yml | 3 +++ lib/ansible/modules/windows/win_firewall_rule.ps1 | 2 +- lib/ansible/modules/windows/win_firewall_rule.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/50143-win_firewall_rule-invalid-bypass.yml diff --git a/changelogs/fragments/50143-win_firewall_rule-invalid-bypass.yml b/changelogs/fragments/50143-win_firewall_rule-invalid-bypass.yml new file mode 100644 index 00000000000..998f98050b9 --- /dev/null +++ b/changelogs/fragments/50143-win_firewall_rule-invalid-bypass.yml @@ -0,0 +1,3 @@ +--- +bugfixes: +- win_firewall_rule - Remove invalid 'bypass' action diff --git a/lib/ansible/modules/windows/win_firewall_rule.ps1 b/lib/ansible/modules/windows/win_firewall_rule.ps1 index 1f512de6027..e16ba1de5f8 100644 --- a/lib/ansible/modules/windows/win_firewall_rule.ps1 +++ b/lib/ansible/modules/windows/win_firewall_rule.ps1 @@ -169,7 +169,7 @@ $diff_support = Get-AnsibleParam -obj $params -name "_ansible_diff" -type "bool" $name = Get-AnsibleParam -obj $params -name "name" -failifempty $true $description = Get-AnsibleParam -obj $params -name "description" -type "str" $direction = Get-AnsibleParam -obj $params -name "direction" -type "str" -failifempty $true -validateset "in","out" -$action = Get-AnsibleParam -obj $params -name "action" -type "str" -failifempty $true -validateset "allow","block","bypass" +$action = Get-AnsibleParam -obj $params -name "action" -type "str" -failifempty $true -validateset "allow","block" $program = Get-AnsibleParam -obj $params -name "program" -type "str" $service = Get-AnsibleParam -obj $params -name "service" -type "str" $enabled = Get-AnsibleParam -obj $params -name "enabled" -type "bool" -default $true -aliases "enable" diff --git a/lib/ansible/modules/windows/win_firewall_rule.py b/lib/ansible/modules/windows/win_firewall_rule.py index 5c1e4691caa..f42875a8110 100644 --- a/lib/ansible/modules/windows/win_firewall_rule.py +++ b/lib/ansible/modules/windows/win_firewall_rule.py @@ -44,7 +44,7 @@ options: description: - What to do with the items this rule is for. required: yes - choices: [ allow, block, bypass ] + choices: [ allow, block ] description: description: - Description for the firewall rule.