From 6ae9e04f273799f8f9b8d88b26b3afbf2422f07c Mon Sep 17 00:00:00 2001 From: Tom David--Broglio Date: Thu, 9 Nov 2023 16:48:17 +0100 Subject: [PATCH] webapps/nextcloud: fix misplaced gid attr and added check for nexctcloud uid --- CHANGELOG.md | 4 +++- webapps/nextcloud/tasks/user.yml | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 845631cb..134c77c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,7 +30,9 @@ The **patch** part changes is incremented if multiple releases happen the same m * evoadmin-web: Fix PHP version for Bookworm * Add php-fpm82 to LDAP when relevant * nagios: fix default file to monitor for check_clamav_db -* webapps/nextcloud: fix missing gid +* webapps/nextcloud: fix missing gid +* webapps/nextcloud: fix misplaced gid attribute +* webapps/nextcloud: added check that nexctcloud uid is over 3000 ### Removed diff --git a/webapps/nextcloud/tasks/user.yml b/webapps/nextcloud/tasks/user.yml index ab00f8ba..c0ce5172 100644 --- a/webapps/nextcloud/tasks/user.yml +++ b/webapps/nextcloud/tasks/user.yml @@ -1,9 +1,15 @@ --- +- name: Check nextcloud user id is over 2999 + ansible.builtin.assert: + that: + - nextcloud_user_uid >= 3000 + - name: Create {{ nextcloud_user }} unix group ansible.builtin.group: name: "{{ nextcloud_user | mandatory }}" state: present + gid: "{{ nextcloud_user_uid | mandatory }}" tags: - nextcloud @@ -13,7 +19,6 @@ group: "{{ nextcloud_user | mandatory }}" home: "{{ nextcloud_home | mandatory }}" uid: "{{ nextcloud_user_uid | mandatory }}" - gid: "{{ nextcloud_user_uid | mandatory }}" shell: '/bin/bash' create_home: True state: present