diff --git a/lib/ansible/modules/extras/monitoring/nagios.py b/lib/ansible/modules/extras/monitoring/nagios.py index cecef5f51b..e3c1a430d7 100644 --- a/lib/ansible/modules/extras/monitoring/nagios.py +++ b/lib/ansible/modules/extras/monitoring/nagios.py @@ -265,7 +265,7 @@ def main(): module.fail_json(msg='no command passed for command action') ################################################################## if not cmdfile: - module.fail_json('unable to locate nagios.cfg') + module.fail_json(msg='unable to locate nagios.cfg') ################################################################## ansible_nagios = Nagios(module, **module.params)