Commit aaa74352 by James Cammarata

Merge pull request #7729 from rgbkrk/ufw_check_direction+interface

Error checking and reporting on interface ufw rule
parents 8ff046a0 da107d3f
......@@ -205,6 +205,9 @@ def main():
if len(commands) < 1:
module.fail_json(msg="Not any of the command arguments %s given" % commands)
if('interface' in params and 'direction' not in params):
module.fail_json(msg="Direction must be specified when creating a rule on an interface")
# Ensure ufw is available
ufw_bin = module.get_bin_path('ufw', True)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment