community.general.bearychat (8.5.0) — module

Send BearyChat notifications

Authors: Jiangge Zhang (@tonyseek)

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

The M(community.general.bearychat) module sends notifications to U(https://bearychat.com) via the Incoming Robot integration.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Send notification message via BearyChat
  local_action:
    module: bearychat
    url: |
      https://hook.bearychat.com/=ae2CF/incoming/e61bd5c57b164e04b11ac02e66f47f60
    text: "{{ inventory_hostname }} completed"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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: false
    channel: "#ansible"
    attachments:
      - title: "Ansible on {{ inventory_hostname }}"
        text: "May the Force be with you."
        color: "#ffffff"
        images:
          - http://example.com/index.png

Inputs

    
url:
    description:
    - BearyChat WebHook URL. This authenticates you to the bearychat service. It looks
      like V(https://hook.bearychat.com/=ae2CF/incoming/e61bd5c57b164e04b11ac02e66f47f60).
    required: true
    type: str

text:
    description:
    - Message to send.
    type: str

channel:
    description:
    - Channel to send the message to. If absent, the message goes to the default channel
      selected by the O(url).
    type: str

markdown:
    default: true
    description:
    - If V(true), text will be parsed as markdown.
    type: bool

attachments:
    description:
    - Define a list of attachments. For more information, see https://github.com/bearyinnovative/bearychat-tutorial/blob/master/robots/incoming.md#attachments
    elements: dict
    type: list

Outputs

msg:
  description: execution result
  returned: success
  sample: OK
  type: str