[FIX] ufw fails asking for a direction for rules without an interface specified [#2758] (#2759)

reviewable/pr18780/r1
ovcharenko 8 years ago committed by René Moser
parent 19107086f4
commit 8485b39ab3

@ -228,7 +228,7 @@ def main():
if len(commands) < 1: if len(commands) < 1:
module.fail_json(msg="Not any of the command arguments %s given" % commands) 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") module.fail_json(msg="Direction must be specified when creating a rule on an interface")
# Ensure ufw is available # Ensure ufw is available

Loading…
Cancel
Save