From a59383fcc7109bff0d7dd0d37162819bda332775 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Tue, 29 Apr 2025 10:31:12 +0300 Subject: [PATCH] Add `matrix_group_system` to configure whether the `matrix` group is also created as a system group We create the `matrix` user as a system user (smaller uid), so it makes sense to do the same for the `matrix` group. --- roles/custom/matrix-base/defaults/main.yml | 3 ++- roles/custom/matrix-base/tasks/setup_matrix_user.yml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/custom/matrix-base/defaults/main.yml b/roles/custom/matrix-base/defaults/main.yml index 84b2707fb..589a3464d 100644 --- a/roles/custom/matrix-base/defaults/main.yml +++ b/roles/custom/matrix-base/defaults/main.yml @@ -176,8 +176,9 @@ matrix_debian_arch: "{{ 'armhf' if matrix_architecture == 'arm32' else matrix_ar matrix_container_global_registry_prefix_override: "" matrix_user_username: "matrix" -matrix_user_groupname: "matrix" matrix_user_system: true +matrix_user_groupname: "matrix" +matrix_group_system: true # By default, the playbook creates the user (`matrix_user_username`) # and group (`matrix_user_groupname`) with a random ID. diff --git a/roles/custom/matrix-base/tasks/setup_matrix_user.yml b/roles/custom/matrix-base/tasks/setup_matrix_user.yml index 37f5cdb99..f45936d14 100644 --- a/roles/custom/matrix-base/tasks/setup_matrix_user.yml +++ b/roles/custom/matrix-base/tasks/setup_matrix_user.yml @@ -10,6 +10,7 @@ name: "{{ matrix_user_groupname }}" gid: "{{ omit if matrix_user_gid is none else matrix_user_gid }}" state: present + system: "{{ matrix_group_system }}" register: matrix_group - name: Ensure Matrix user is created