diff --git a/monitoring/boundary_meter b/monitoring/boundary_meter index 71ea2b548c4..70ac8ea013f 100644 --- a/monitoring/boundary_meter +++ b/monitoring/boundary_meter @@ -203,7 +203,7 @@ def delete_meter(module, name, apiid, apikey): try: cert_file = '%s/%s.pem' % (config_directory,cert_type) os.remove(cert_file) - except OSError, e: ## if failed, report it back to the user ## + except OSError, e: module.fail_json("Failed to remove " + cert_type + ".pem file") return 0, "Meter " + name + " deleted" @@ -268,4 +268,4 @@ def main(): # include magic from lib/ansible/module_common.py #<> -main() \ No newline at end of file +main()