diff options
author | Fabio Alessandro Locati <me@fale.io> | 2016-08-30 23:04:48 +0200 |
---|---|---|
committer | René Moser <mail@renemoser.net> | 2016-08-30 23:04:48 +0200 |
commit | 2c78dea646975f7e32cc40bc05bb5c1eacb67359 (patch) | |
tree | 5e6948cc32a47b617de5cf2507ec5fe14af4cff8 /notification | |
parent | 44c86245fff5edc937f84461754c0090f099f9b2 (diff) | |
download | ansible-modules-extras-2c78dea646975f7e32cc40bc05bb5c1eacb67359.tar.gz |
Require domain in rocketchat (#2803)
* Set the domain as required
* Add domain in the examples as well
Diffstat (limited to 'notification')
-rw-r--r-- | notification/rocketchat.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/notification/rocketchat.py b/notification/rocketchat.py index 1239fc01..ffce7971 100644 --- a/notification/rocketchat.py +++ b/notification/rocketchat.py @@ -113,11 +113,13 @@ EXAMPLES = """ local_action: module: rocketchat token: thetoken/generatedby/rocketchat + domain: chat.example.com msg: "{{ inventory_hostname }} completed" - name: Send notification message via Rocket Chat all options local_action: module: rocketchat + domain: chat.example.com token: thetoken/generatedby/rocketchat msg: "{{ inventory_hostname }} completed" channel: "#ansible" @@ -128,6 +130,7 @@ EXAMPLES = """ - name: insert a color bar in front of the message for visibility purposes and use the default webhook icon and name configured in rocketchat rocketchat: token: thetoken/generatedby/rocketchat + domain: chat.example.com msg: "{{ inventory_hostname }} is alive!" color: good username: "" @@ -136,6 +139,7 @@ EXAMPLES = """ - name: Use the attachments API rocketchat: token: thetoken/generatedby/rocketchat + domain: chat.example.com attachments: - text: "Display my system load on host A and B" color: "#ff00dd" @@ -207,7 +211,7 @@ def do_notify_rocketchat(module, domain, token, protocol, payload): def main(): module = AnsibleModule( argument_spec = dict( - domain = dict(type='str', required=False, default=None), + domain = dict(type='str', required=True, default=None), token = dict(type='str', required=True, no_log=True), protocol = dict(type='str', default='https', choices=['http', 'https']), msg = dict(type='str', required=False, default=None), |