containernerds.discord.webhook_message (0.1.1) — module

Send Discord notifications using Webhooks

Authors: Anthony Loukinas (@anthonyloukinas)

Install collection

Install with ansible-galaxy collection install containernerds.discord:==0.1.1


Add to requirements.yml

  collections:
    - name: containernerds.discord
      version: 0.1.1

Description

The C(discord) module sends notifications to U(http://discordapp.com) via the Incoming WebHook integration

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Send notification message via Discord
  containernerds.discord.webhook_message:
    webhook: Discord/Webhook/Link
    msg: 'This is a test'
  delegate_to: localhost

Inputs

    
msg:
    description:
    - Message to send. Note that the module does not handle escaping characters. Plain-text
      angle brackets and ampersands should be converted to HTML entities (e.g. & to &)
      before sending.
    required: true
    type: str

embeds:
    description:
    - Rich Embed message. Embed objects can be found here https://discord.com/developers/docs/resources/channel#embed-object
      Expecting list of dictonaries as shown https://github.com/ContainerNerds/containernerds.discord#with-embed
    elements: dict
    required: false
    type: list

webhook:
    description:
    - Discord webook url. This authenticates you to the discord service. Make sure to
      use keep this private.
    required: true
    type: str

username:
    default: Ansible
    description:
    - This is the sender of the message.
    type: str

avatar_url:
    default: https://www.ansible.com/favicon.ico
    description:
    - Url for the message sender's icon (default C(https://www.ansible.com/favicon.ico))
    type: str