1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

fixed undefined msg and now actually return something meaningful fixes #1127

This commit is contained in:
Brian Coca 2015-10-19 12:14:51 -04:00 committed by Matt Clay
parent ea6fdeb585
commit 577566139f

View file

@ -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 *