famedly.matrix.matrix_state (0.2.2) — module

Set matrix room state

Authors: Jan Christian Grünhage (@jcgruenhage)

preview | supported by community

Install collection

Install with ansible-galaxy collection install famedly.matrix:==0.2.2


Add to requirements.yml

  collections:
    - name: famedly.matrix
      version: 0.2.2

Description

This module sets matrix room state idempotently


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Set the server ACL for the admin room
  matrix_state:
    event_type: m.room.server_acl
    state_key: ""
    content:
      allow:
        - "*"
      deny:
        - "bad-server.one"
        - "bad-server.two"
    room_id: "!LAVFnosfDouvhA9VEhiuSV:matrix.org"
    hs_url: "https://matrix.org"
    token: "{{ matrix_auth_token }}"

Inputs

    
token:
    description:
    - Authentication token for the API call.
    required: true

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

content:
    description:
    - The content to set the state to
    required: true

room_id:
    description:
    - ID of the room to set the state for
    required: true

state_key:
    description:
    - State key for the state event to be set
    required: true

event_type:
    description:
    - Event type of the state to be set
    required: true

Outputs

event_id:
  description:
  - ID of the created event
  returned: changed
  sample: $Het2Dv7EEDFNJNgY-ehLSUrdqMo8JOxZDCMnuQPSNfo
  type: str