1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

added the profile option + updated the docs for it

This commit is contained in:
Timothy Vandenbrande 2015-06-30 08:39:19 +02:00 committed by Matt Clay
parent d8663132ad
commit 115fb59136
2 changed files with 15 additions and 2 deletions

View file

@ -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 @{

View file

@ -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