summaryrefslogtreecommitdiff
path: root/system/iptables.py
diff options
context:
space:
mode:
authorDaniel Vigueras <dvigueras@doalitic.com>2016-01-18 16:00:09 +0100
committerDaniel Vigueras <dvigueras@doalitic.com>2016-01-18 16:00:09 +0100
commitece6872b811d54d4c696208dc418ea41ed07c855 (patch)
tree90c2d7bed0f5553c105097797047f3fe91059640 /system/iptables.py
parent570869ef48ec0bcdc9c2138e89bc77a3fe59282a (diff)
downloadansible-modules-extras-ece6872b811d54d4c696208dc418ea41ed07c855.tar.gz
iptables: add --limit-burst option
Diffstat (limited to 'system/iptables.py')
-rw-r--r--system/iptables.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/system/iptables.py b/system/iptables.py
index 2b71e1f9..725259f1 100644
--- a/system/iptables.py
+++ b/system/iptables.py
@@ -211,6 +211,10 @@ options:
description:
- "Specifies the maximum average number of matches to allow per second. The number can specify units explicitly, using `/second', `/minute', `/hour' or `/day', or parts of them (so `5/second' is the same as `5/s')."
required: false
+ limit_burst:
+ description:
+ - "Specifies the maximum burst before the above limit kicks in."
+ required: false
'''
EXAMPLES = '''
@@ -266,8 +270,9 @@ def construct_rule(params):
append_param(rule, params['comment'], '--comment', False)
append_match(rule, params['ctstate'], 'state')
append_csv(rule, params['ctstate'], '--state')
- append_match(rule, params['limit'], 'limit')
+ append_match(rule, params['limit'] or params['limit_burst'], 'limit')
append_param(rule, params['limit'], '--limit', False)
+ append_param(rule, params['limit_burst'], '--limit-burst', False)
return rule
@@ -319,6 +324,7 @@ def main():
comment=dict(required=False, default=None, type='str'),
ctstate=dict(required=False, default=[], type='list'),
limit=dict(required=False, default=None, type='str'),
+ limit_burst=dict(required=False, default=None, type='str'),
),
)
args = dict(