From 22ebf0309320b0029ae1978c4a788f65dbfb636d Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Mon, 19 Oct 2015 12:14:51 -0400 Subject: [PATCH] fixed undefined msg and now actually return something meaningful fixes #1127 --- notification/pushover.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/notification/pushover.py b/notification/pushover.py index 0c1d6e94ab9..24d343a6809 100644 --- a/notification/pushover.py +++ b/notification/pushover.py @@ -102,11 +102,11 @@ def main(): msg_object = Pushover(module, module.params['user_key'], module.params['app_token']) try: - msg_object.run(module.params['pri'], module.params['msg']) + response = msg_object.run(module.params['pri'], module.params['msg']) except: module.fail_json(msg='Unable to send msg via pushover') - module.exit_json(msg=msg, changed=False) + module.exit_json(msg='message sent successfully: %s' % response, changed=False) # import module snippets from ansible.module_utils.basic import *