diff --git a/tasks/groupfolders.yml b/tasks/groupfolders.yml index bc81857..7e8eb1b 100644 --- a/tasks/groupfolders.yml +++ b/tasks/groupfolders.yml @@ -47,6 +47,13 @@ search_key: "mount_point" search_val: "{{ item.name }}" + # We search for some random name so that the LDAP data cache gets updated + - name: update LDAP cache + command: "/usr/bin/php occ ldap:search random_string_to_update_cache" + args: + chdir: /var/www/nextcloud + changed_when: False + # Set folder permissions if they are not correct yet - name: Set folder permissions command: "/usr/bin/php occ groupfolders:group {{ (group_folders | selectattr(search_key, 'equalto', search_val) | list | first).id }} {{ item.1 }} write share delete"