From 0af6e6d9d970715ae1513a5ccf47f5321298fea9 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Thu, 23 Feb 2023 08:26:35 +0200 Subject: [PATCH] Make wait time for matrix-user-creator configurable and increase default (7 -> 10 sec.) --- roles/custom/matrix-user-creator/defaults/main.yml | 3 +++ roles/custom/matrix-user-creator/tasks/setup.yml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/roles/custom/matrix-user-creator/defaults/main.yml b/roles/custom/matrix-user-creator/defaults/main.yml index 5c90a1e0..20aad3d1 100644 --- a/roles/custom/matrix-user-creator/defaults/main.yml +++ b/roles/custom/matrix-user-creator/defaults/main.yml @@ -20,3 +20,6 @@ matrix_user_creator_users_auto: [] # Add your own users here to have them end up in `matrix_user_creator_users` (see `vars/main.yml`) and get automatically created. # For example syntax for this variable, see the documentation for `matrix_user_creator_users` in `vars/main.yml`. matrix_user_creator_users_additional: [] + +# matrix_user_creator_homeserver_start_wait_time_seconds specifies how long to wait after starting the homeserver service and before doing our work. +matrix_user_creator_homeserver_start_wait_time_seconds: 10 diff --git a/roles/custom/matrix-user-creator/tasks/setup.yml b/roles/custom/matrix-user-creator/tasks/setup.yml index 73dfd454..d53726bd 100644 --- a/roles/custom/matrix-user-creator/tasks/setup.yml +++ b/roles/custom/matrix-user-creator/tasks/setup.yml @@ -21,7 +21,7 @@ - name: Wait a while, so that the homeserver can manage to start before creating Matrix users ansible.builtin.pause: - seconds: 7 + seconds: "{{ matrix_user_creator_homeserver_start_wait_time_seconds }}" when: matrix_user_registrator_homeserver_start_result.changed | bool - name: Ensure Matrix users are created