From f83f56954162e3f8a115e85c158f5242c2de2f7e Mon Sep 17 00:00:00 2001 From: Matthew Fennell Date: Sat, 5 Jul 2025 23:19:01 +0100 Subject: Do not register users on run These steps where not idempotent, because there was no way to check if the password was correct. So, they would again each time. The playbook gets run infrequently enough, and it is simple enough, to add users manually. --- playbook.yaml | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'playbook.yaml') diff --git a/playbook.yaml b/playbook.yaml index b52c9ce..ac4b2c1 100644 --- a/playbook.yaml +++ b/playbook.yaml @@ -405,30 +405,6 @@ notify: Restart prosody when: roster_groups is defined - - name: Ensure prosody users are registered - ansible.builtin.expect: - command: "prosodyctl adduser {{ item.name }}@{{ virtual_host }}" - responses: - (?i)password: "{{ item.password }}" - become: true - register: adduser_result - changed_when: - "'That user already exists' not in adduser_result.stdout_lines" - failed_when: false - no_log: true - with_items: "{{ users }}" - - - name: Ensure prosody users have the given password - ansible.builtin.expect: - command: "prosodyctl passwd {{ item.name }}@{{ virtual_host }}" - responses: - (?i)password: "{{ item.password }}" - become: true - register: passwd_result - changed_when: true - no_log: true - with_items: "{{ users }}" - - name: Ensure prosody is enabled ansible.builtin.service: name: prosody -- cgit v1.2.3