From 847f7f3d959ff8932466d45c60b16119acbec051 Mon Sep 17 00:00:00 2001 From: Matthew Fennell Date: Mon, 19 Aug 2024 22:01:58 +0100 Subject: Enable roster groups This is useful for two reasons: * To test clients that render roster groups provided by the server * To evaluate whether it is worth enabling this flag in production --- playbook.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'playbook.yaml') diff --git a/playbook.yaml b/playbook.yaml index 4c366f1..dd3281b 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -385,6 +385,27 @@ state: absent become: true + - name: Ensure prosody groups directory is created + ansible.builtin.file: + path: /etc/prosody/groups + state: directory + owner: root + mode: '0754' + group: prosody + become: true + when: roster_groups is defined + + - name: Ensure prosody groups are defined + ansible.builtin.copy: + content: "{{ roster_groups }}" + dest: "/etc/prosody/groups/{{ virtual_host }}.toml" + owner: root + group: prosody + mode: '0640' + become: true + notify: Restart prosody + when: roster_groups is defined + - name: Ensure prosody users are registered ansible.builtin.expect: command: "prosodyctl adduser {{ item.name }}@{{ virtual_host }}" -- cgit v1.2.3