summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Fennell <matthew@fennell.dev>2025-07-05 23:19:01 +0100
committerMatthew Fennell <matthew@fennell.dev>2025-07-05 23:19:01 +0100
commitf83f56954162e3f8a115e85c158f5242c2de2f7e (patch)
tree2fea746d6373e347928bdb0f4bd48fdb46829e6f
parent35c52b7e592244d2d04f9c9fa21c4ad757ed9726 (diff)
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.
-rw-r--r--playbook.yaml24
1 files changed, 0 insertions, 24 deletions
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