From 3194ffd5bd9d674f19ee49f8fbce406cdc9666aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Sat, 6 Jul 2024 10:20:54 +0200 Subject: feat(roles/nextcloud): manage email with occ --- roles/nextcloud/defaults/main.yml | 2 +- roles/nextcloud/occ.yml | 17 ++++++++++++++++- roles/nextcloud/tasks/main.yml | 8 ++++---- 3 files changed, 21 insertions(+), 6 deletions(-) (limited to 'roles/nextcloud') 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 -- cgit v1.2.3