diff options
-rw-r--r-- | group_vars/all.yml | 4 | ||||
-rw-r--r-- | roles/nextcloud/defaults/main.yml | 2 | ||||
-rw-r--r-- | roles/nextcloud/occ.yml | 17 | ||||
-rw-r--r-- | roles/nextcloud/tasks/main.yml | 8 |
4 files changed, 23 insertions, 8 deletions
diff --git a/group_vars/all.yml b/group_vars/all.yml index 4b0160d..6ecee5b 100644 --- a/group_vars/all.yml +++ b/group_vars/all.yml @@ -93,8 +93,8 @@ nextcloud__users: "[ {% for user in __users %} {{ { 'username': user.username, - 'fullname': user.firstname + ' ' + user.lastname, - 'email': user.email, + 'display_name': user.firstname + ' ' + user.lastname, + 'email': user.email if user.email else '', } }}, {% endfor %} ]" diff --git a/roles/nextcloud/defaults/main.yml b/roles/nextcloud/defaults/main.yml index c920a55..9d55b89 100644 --- a/roles/nextcloud/defaults/main.yml +++ b/roles/nextcloud/defaults/main.yml @@ -86,7 +86,7 @@ nextcloud__php_settings: value: 4096 - section: opcache option: opcache.interned_strings_buffer - value: 8 + value: 64 - section: opcache option: opcache.max_accelerated_files value: 10000 diff --git a/roles/nextcloud/occ.yml b/roles/nextcloud/occ.yml index c881d30..e6f41f1 100644 --- a/roles/nextcloud/occ.yml +++ b/roles/nextcloud/occ.yml @@ -63,7 +63,7 @@ - occ - user:add - --password-from-env - - "--display-name={{ item.fullname }}" + - "--display-name={{ item.display_name }}" - "{{ item.username }}" chdir: "{{ httpd_pre__chroot_dir }}/nextcloud" environment: @@ -78,3 +78,18 @@ - '"already exists" not in nextcloud__result_create_application_users.stdout' changed_when: - '"already exists" not in nextcloud__result_create_application_users.stdout' + +- name: update application users + ansible.builtin.command: + argv: + - "{{ nextcloud__php_bin }}" + - occ + - user:setting + - "{{ item.0.username }}" + - settings + - "{{ item.1 }}" + - "{{ item.0[item.1] }}" + chdir: "{{ httpd_pre__chroot_dir }}/nextcloud" + with_nested: + - "{{ nextcloud__users }}" + - ["email"] diff --git a/roles/nextcloud/tasks/main.yml b/roles/nextcloud/tasks/main.yml index 6eb5d21..1426d4b 100644 --- a/roles/nextcloud/tasks/main.yml +++ b/roles/nextcloud/tasks/main.yml @@ -48,10 +48,6 @@ ansible.builtin.import_tasks: file: php.yml -- name: import dependencies tasks - ansible.builtin.import_tasks: - file: dependencies.yml - - name: import database tasks ansible.builtin.import_tasks: file: database.yml @@ -66,6 +62,10 @@ become_method: su become_flags: -s /bin/sh +- name: import dependencies tasks + ansible.builtin.import_tasks: + file: dependencies.yml + - name: enable nextcloud background jobs ansible.builtin.cron: name: nextcloud background jobs |