diff options
author | Brian Coca <bcoca@ansible.com> | 2015-07-27 11:12:17 -0400 |
---|---|---|
committer | Brian Coca <bcoca@ansible.com> | 2015-07-27 11:12:17 -0400 |
commit | 4563d17953b6ea2637d977c9e5eeac41fa06c648 (patch) | |
tree | f1c78cbc95ca850bfe8fcee0b7f616cf4fb5429b | |
parent | 146c2ac3bc2104f0c68ffca8ae01576cbf1b210c (diff) | |
parent | 439bccc286ba57b5f7dec5eb5686bda939729401 (diff) | |
download | ansible-modules-extras-4563d17953b6ea2637d977c9e5eeac41fa06c648.tar.gz |
Merge pull request #768 from fnando/fix-hipchat-notifier
Hipchat uses incorrect variable name.
-rw-r--r-- | notification/hipchat.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/notification/hipchat.py b/notification/hipchat.py index 57e97eae..f3846173 100644 --- a/notification/hipchat.py +++ b/notification/hipchat.py @@ -71,10 +71,10 @@ EXAMPLES = ''' # Use Hipchat API version 2 -- hipchat: +- hipchat: api: "https://api.hipchat.com/v2/" token: OAUTH2_TOKEN - room: notify + room: notify msg: "Ansible task finished" ''' @@ -103,7 +103,7 @@ def send_msg_v1(module, token, room, msg_from, msg, msg_format='text', params['color'] = color params['api'] = api params['notify'] = int(notify) - + url = api + MSG_URI_V1 + "?auth_token=%s" % (token) data = urllib.urlencode(params) @@ -129,10 +129,10 @@ def send_msg_v2(module, token, room, msg_from, msg, msg_format='text', body['message'] = msg body['color'] = color body['message_format'] = msg_format - params['notify'] = notify + body['notify'] = notify POST_URL = api + NOTIFY_URI_V2 - + url = POST_URL.replace('{id_or_name}', room) data = json.dumps(body) |