From db805048395516ca86bac0d769de41e1f5b04fe5 Mon Sep 17 00:00:00 2001 From: Pilou Date: Thu, 12 Apr 2018 15:43:00 +0200 Subject: [PATCH] firewalld: fix AttributeError (#38442) Error was: File "/tmp/ansible_qY_BMb/ansible_module_firewalld.py", line 703, in main() File "/tmp/ansible_qY_BMb/ansible_module_firewalld.py", line 548, in main module.fail(msg='firewall is not currently running, unable to perform immediate actions without a running firewall daemon') AttributeError: 'AnsibleModule' object has no attribute 'fail' --- lib/ansible/modules/system/firewalld.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/system/firewalld.py b/lib/ansible/modules/system/firewalld.py index da92fbe9b0..313aff556c 100644 --- a/lib/ansible/modules/system/firewalld.py +++ b/lib/ansible/modules/system/firewalld.py @@ -829,7 +829,7 @@ def main(): # Verify required params are provided if immediate and fw_offline: - module.fail(msg='firewall is not currently running, unable to perform immediate actions without a running firewall daemon') + module.fail_json(msg='firewall is not currently running, unable to perform immediate actions without a running firewall daemon') changed = False msgs = []