From 61bdf9ee0fa494fe91a68cafcc2746cb38c8ca02 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Thu, 17 Mar 2016 18:07:47 +0100 Subject: [PATCH] Fix #1809, use the proper method to fail --- lib/ansible/modules/extras/system/firewalld.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/modules/extras/system/firewalld.py b/lib/ansible/modules/extras/system/firewalld.py index 012275bf1bf..f26a781f57c 100644 --- a/lib/ansible/modules/extras/system/firewalld.py +++ b/lib/ansible/modules/extras/system/firewalld.py @@ -257,6 +257,8 @@ def main(): ), supports_check_mode=True ) + if module.params['source'] == None and module.params['permanent'] == None: + module.fail_json(msg='permanent is a required parameter') if not HAS_FIREWALLD: module.fail_json(msg='firewalld and its python 2 module are required for this module')