Require domain in rocketchat (#2803)
* Set the domain as required * Add domain in the examples as well
This commit is contained in:
parent
09776a9e52
commit
4af6033469
1 changed files with 5 additions and 1 deletions
|
@ -113,11 +113,13 @@ EXAMPLES = """
|
||||||
local_action:
|
local_action:
|
||||||
module: rocketchat
|
module: rocketchat
|
||||||
token: thetoken/generatedby/rocketchat
|
token: thetoken/generatedby/rocketchat
|
||||||
|
domain: chat.example.com
|
||||||
msg: "{{ inventory_hostname }} completed"
|
msg: "{{ inventory_hostname }} completed"
|
||||||
|
|
||||||
- name: Send notification message via Rocket Chat all options
|
- name: Send notification message via Rocket Chat all options
|
||||||
local_action:
|
local_action:
|
||||||
module: rocketchat
|
module: rocketchat
|
||||||
|
domain: chat.example.com
|
||||||
token: thetoken/generatedby/rocketchat
|
token: thetoken/generatedby/rocketchat
|
||||||
msg: "{{ inventory_hostname }} completed"
|
msg: "{{ inventory_hostname }} completed"
|
||||||
channel: "#ansible"
|
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
|
- 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:
|
rocketchat:
|
||||||
token: thetoken/generatedby/rocketchat
|
token: thetoken/generatedby/rocketchat
|
||||||
|
domain: chat.example.com
|
||||||
msg: "{{ inventory_hostname }} is alive!"
|
msg: "{{ inventory_hostname }} is alive!"
|
||||||
color: good
|
color: good
|
||||||
username: ""
|
username: ""
|
||||||
|
@ -136,6 +139,7 @@ EXAMPLES = """
|
||||||
- name: Use the attachments API
|
- name: Use the attachments API
|
||||||
rocketchat:
|
rocketchat:
|
||||||
token: thetoken/generatedby/rocketchat
|
token: thetoken/generatedby/rocketchat
|
||||||
|
domain: chat.example.com
|
||||||
attachments:
|
attachments:
|
||||||
- text: "Display my system load on host A and B"
|
- text: "Display my system load on host A and B"
|
||||||
color: "#ff00dd"
|
color: "#ff00dd"
|
||||||
|
@ -207,7 +211,7 @@ def do_notify_rocketchat(module, domain, token, protocol, payload):
|
||||||
def main():
|
def main():
|
||||||
module = AnsibleModule(
|
module = AnsibleModule(
|
||||||
argument_spec = dict(
|
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),
|
token = dict(type='str', required=True, no_log=True),
|
||||||
protocol = dict(type='str', default='https', choices=['http', 'https']),
|
protocol = dict(type='str', default='https', choices=['http', 'https']),
|
||||||
msg = dict(type='str', required=False, default=None),
|
msg = dict(type='str', required=False, default=None),
|
||||||
|
|
Loading…
Reference in a new issue