From 7c19002f341e69a966795336b8b4201a901f6ce7 Mon Sep 17 00:00:00 2001
From: Michael Scherer <mscherer@users.noreply.github.com>
Date: Wed, 13 Apr 2016 20:32:47 +0200
Subject: [PATCH] Fix arguments for pushover module

Since user_key and app_token are used for authentication, I
suspect both of them should be kept secret.

According to the API manual, https://pushover.net/api
priority go from -2 to 2, so the argument should be constrained.
---
 lib/ansible/modules/extras/notification/pushover.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/ansible/modules/extras/notification/pushover.py b/lib/ansible/modules/extras/notification/pushover.py
index 29afcaa6356..2cd973b1bcc 100644
--- a/lib/ansible/modules/extras/notification/pushover.py
+++ b/lib/ansible/modules/extras/notification/pushover.py
@@ -95,9 +95,9 @@ def main():
     module = AnsibleModule(
         argument_spec=dict(
             msg=dict(required=True),
-            app_token=dict(required=True),
-            user_key=dict(required=True),
-            pri=dict(required=False, default=0),
+            app_token=dict(required=True, no_log=True),
+            user_key=dict(required=True, no_log=True),
+            pri=dict(required=False, default='0', choices=['-2','-1','0','1','2']),
         ),
     )