24 lines
558 B
YAML
24 lines
558 B
YAML
# code: language=ansible
|
|
|
|
- name: Clean Synapse
|
|
hosts: localhost
|
|
connection: local
|
|
become: false
|
|
gather_facts: false
|
|
vars_prompt:
|
|
- name: room_id
|
|
prompt: "Enter the room ID to fetch"
|
|
private: false
|
|
tasks:
|
|
|
|
- name: Get room details
|
|
ansible.builtin.uri:
|
|
url: "https://{{ synapse_host_address }}/_synapse/admin/v1/rooms/{{ room_id }}"
|
|
headers:
|
|
Authorization: "Bearer {{ synapse_admin_token }}"
|
|
register: result
|
|
|
|
- name: Print result
|
|
ansible.builtin.debug:
|
|
var: result.json
|