update cache before using groups

This commit is contained in:
Morre 2020-10-02 15:11:28 +02:00
parent bea7ae178d
commit 78de59fbfe
No known key found for this signature in database
GPG key ID: 5D9B9B1B8F424BBC

View file

@ -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"