community.general.matrix module – Send notifications to matrix
Note
This module is part of the community.general collection (version 6.6.2).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.general
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: community.general.matrix
.
Synopsis
This module sends html formatted notifications to matrix rooms.
Requirements
The below requirements are needed on the host that executes this module.
matrix-client (Python library)
Parameters
Parameter |
Comments |
---|---|
URL of the homeserver, where the CS-API is reachable |
|
HTML form of the message to send to matrix |
|
Plain text form of the message to send to matrix, usually markdown |
|
The password to log in with |
|
ID of the room to send the notification to |
|
Authentication token for the API call. If provided, user_id and password are not required |
|
The user id of the user |
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full |
Can run in |
|
Support: none |
Will return details on what has changed (or possibly needs changing in |
Examples
- name: Send matrix notification with token
community.general.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 }}"
- name: Send matrix notification with user_id and password
community.general.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 }}"
Collection links
Issue Tracker Repository (Sources) Submit a bug report Request a feature Communication