summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorovcharenko <aleksey.ovcharenko@gmail.com>2016-08-23 11:14:22 +0300
committerRené Moser <mail@renemoser.net>2016-08-23 10:14:22 +0200
commit8485b39ab305fe6073313a13ea547a0c7462415b (patch)
tree450a869841eff1d5b600815e1458e356855c79d3 /system
parent19107086f4b89ff8c2b77ffa9d1fe98eae9c9b72 (diff)
downloadansible-modules-extras-8485b39ab305fe6073313a13ea547a0c7462415b.tar.gz
[FIX] ufw fails asking for a direction for rules without an interface specified [#2758] (#2759)
Diffstat (limited to 'system')
-rw-r--r--system/ufw.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/ufw.py b/system/ufw.py
index e88c1456..c692211d 100644
--- a/system/ufw.py
+++ b/system/ufw.py
@@ -228,7 +228,7 @@ def main():
if len(commands) < 1:
module.fail_json(msg="Not any of the command arguments %s given" % commands)
- if('interface' in params and params['direction'] is None):
+ if(params['interface'] is not None and params['direction'] is None):
module.fail_json(msg="Direction must be specified when creating a rule on an interface")
# Ensure ufw is available