ansible.builtin.matrix (v2.9.27) — module

Send notifications to matrix

| "added in version" 2.8 of ansible.builtin"

Authors: Jan Christian Grünhage (@jcgruenhage)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.9.27

Description

This module sends html formatted notifications to matrix rooms.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Send matrix notification with token
  matrix:
    msg_plain: "**hello world**"
    msg_html: "<b>hello world</b>"
    room_id: "!12345678:server.tld"
    hs_url: "https://matrix.org"
    token: "{{ matrix_auth_token }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Send matrix notification with user_id and password
  matrix:
    msg_plain: "**hello world**"
    msg_html: "<b>hello world</b>"
    room_id: "!12345678:server.tld"
    hs_url: "https://matrix.org"
    user_id: "ansible_notification_bot"
    password: "{{ matrix_auth_password }}"

Inputs

    
token:
    description:
    - Authentication token for the API call. If provided, user_id and password are not
      required

hs_url:
    description:
    - URL of the homeserver, where the CS-API is reachable
    required: true

room_id:
    description:
    - ID of the room to send the notification to
    required: true

user_id:
    description:
    - The user id of the user

msg_html:
    description:
    - HTML form of the message to send to matrix
    required: true

password:
    description:
    - The password to log in with

msg_plain:
    description:
    - Plain text form of the message to send to matrix, usually markdown
    required: true