diff --git a/notification/hall.py b/notification/hall.py
index 7c76e52379f..05c1a981b73 100755
--- a/notification/hall.py
+++ b/notification/hall.py
@@ -18,18 +18,18 @@
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see .
-
+
DOCUMENTATION = """
module: hall
short_description: Send notification to Hall
description:
- - The M(hall) module connects to the U(https://hall.com) messaging API and allows you to deliver notication messages to rooms.
-version_added: 1.6
-author: Billy Kimble
+ - "The M(hall) module connects to the U(https://hall.com) messaging API and allows you to deliver notication messages to rooms."
+version_added: "2.0"
+author: Billy Kimble (@bkimble)
options:
room_token:
description:
- - Room token provided to you by setting up the Ansible room integation on U(https://hall.com)
+ - "Room token provided to you by setting up the Ansible room integation on U(https://hall.com)"
required: true
msg:
description:
@@ -41,12 +41,12 @@ options:
required: true
picture:
description:
- - The full URL to the image you wish to use for the Icon of the message. Defaults to U(http://cdn2.hubspot.net/hub/330046/file-769078210-png/Official_Logos/ansible_logo_black_square_small.png?t=1421076128627)
+ - "The full URL to the image you wish to use for the Icon of the message. Defaults to U(http://cdn2.hubspot.net/hub/330046/file-769078210-png/Official_Logos/ansible_logo_black_square_small.png?t=1421076128627)"
required: false
-"""
+"""
EXAMPLES = """
-- name: Send Hall notifiation
+- name: Send Hall notifiation
local_action:
module: hall
room_token:
@@ -57,7 +57,7 @@ EXAMPLES = """
when: ec2.instances|length > 0
local_action:
module: hall
- room_token:
+ room_token:
title: Server Creation
msg: "Created EC2 instance {{ item.id }} of type {{ item.instance_type }}.\\nInstance can be reached at {{ item.public_ip }} in the {{ item.region }} region."
with_items: ec2.instances
@@ -66,7 +66,7 @@ EXAMPLES = """
HALL_API_ENDPOINT = 'https://hall.com/api/1/services/generic/%s'
def send_request_to_hall(module, room_token, payload):
- headers = {'Content-Type': 'application/json'}
+ headers = {'Content-Type': 'application/json'}
payload=module.jsonify(payload)
api_endpoint = HALL_API_ENDPOINT % (room_token)
response, info = fetch_url(module, api_endpoint, data=payload, headers=headers)
@@ -83,7 +83,7 @@ def main():
picture = dict(type='str', default='http://cdn2.hubspot.net/hub/330046/file-769078210-png/Official_Logos/ansible_logo_black_square_small.png?t=1421076128627'),
)
)
-
+
room_token = module.params['room_token']
message = module.params['msg']
title = module.params['title']