community.general.bearychat – Send BearyChat notifications

From Get docs
Ansible/docs/2.11/collections/community/general/bearychat module


community.general.bearychat – Send BearyChat notifications

Note

This plugin is part of the community.general collection (version 2.0.1).

To install it use: ansible-galaxy collection install community.general.

To use it in a playbook, specify: community.general.bearychat.


Synopsis

Parameters

Parameter Choices/Defaults Comments

attachments

list / elements=dictionary

channel

string

Channel to send the message to. If absent, the message goes to the default channel selected by the url.

markdown

boolean

  • no
  • yes

If yes, text will be parsed as markdown.

text

string

Message to send.

url

string / required

BearyChat WebHook URL. This authenticates you to the bearychat service. It looks like https://hook.bearychat.com/=ae2CF/incoming/e61bd5c57b164e04b11ac02e66f47f60.



Examples

- name: Send notification message via BearyChat
  local_action:
    module: bearychat
    url: |
      https://hook.bearychat.com/=ae2CF/incoming/e61bd5c57b164e04b11ac02e66f47f60
    text: "{{ inventory_hostname }} completed"

- name: Send notification message via BearyChat all options
  local_action:
    module: bearychat
    url: |
      https://hook.bearychat.com/=ae2CF/incoming/e61bd5c57b164e04b11ac02e66f47f60
    text: "{{ inventory_hostname }} completed"
    markdown: no
    channel: "#ansible"
    attachments:
      - title: "Ansible on {{ inventory_hostname }}"
        text: "May the Force be with you."
        color: "#ffffff"
        images:
          - http://example.com/index.png

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description

msg

string

success

execution result


Sample:

OK




Authors

  • Jiangge Zhang (@tonyseek)

© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/collections/community/general/bearychat_module.html